TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
catalin ilie
NA
1
9.3k
Checkboxlist index issue
Dec 8 2010 3:36 AM
Hello there. i want to make an application, i use a checkboxlist, and i want to retain in an array checked or unchecked indexes like this: for unchecked items, the array location should be a 0, and for checked items, the array location should be 1.
i tried like this:
[code]
private void checkboxlist1_SelectedIndexChanged(object sender, EventArgs e)
{
int[] v=new int[6];
for(int i=0;i<6;i++)
if(checkboxlist1.getitemchecked(i))
v[i]=1;
else
v[i]=0;
string w=v.ToString();
}
[/code]
and then , the result is wrong. for example, if i check the first three items, the result will be 110000. it seems it's a step behind or something. should i use itemcheck event instead of selectedindexchanged, or both, or what? thank you
Reply
Answers (
4
)
How do i change the width of the row selector ?
DataGrideView Question