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
sanjeeva kalakuntla
NA
130
2.9k
issue with check box behaviour in datagridview in c#.
Apr 2 2013 1:56 AM
I have a problem with the check box.I am using check box with the datagridview in windows forms in c#. when I check and uncheck the check box quickly( less than a sec),it is taking as checked.please help me
this is what i tried
if (e.ColumnIndex == dgCategoryView.Columns["chkSelectCategory"].Index&&e.RowIndex>=0) {
DataGridViewCheckBoxCell ch1 = new DataGridViewCheckBoxCell();
ch1=(DataGridViewCheckBoxCell)dgCategoryView.Rows[dgCategoryView.CurrentRow.Index].Cells[0]; if (ch1.Value == null)
ch1.Value = false;
switch (ch1.Value.ToString())
{
case "True":
for (int i = 0; i < Categoryrowlist.Count; i++)
{
if (Categoryrowlist[i] == categoryList[e.RowIndex + currentC].Id)
{
Categoryrowlist.Remove(Categoryrowlist[i]);
}
}
ch1.Value = false;
break;
case "False":
Categoryrowlist.Add(categoryList[e.RowIndex + currentC].Id);
ch1.Value = true;
break;
}
}
Reply
Answers (
1
)
c#.net
how to set accept in cell(2) after selecting in gridview