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
Dan Condes
NA
2
446
Delay of display
Nov 22 2018 11:09 AM
Hello,
I'm making a program that displays records in a datagridview. This rows has a checkbox so the user can tick what row they like.
I want to display the number of selected items (the one the ticked) upon ticking the checkbox row.
Here is my code on counting the checked rows. But the update of the text label for the count do not happen right after I tick the box.
what should i do?
public void DisplaySelectedMSGFiles() {
int check_ctr =0;
DataGridViewCheckBoxCell oCell;
foreach (DataGridViewRow r in dgmsgfiles.Rows)
{
oCell = r.Cells[0] as DataGridViewCheckBoxCell;
if (oCell.Value!=null && oCell.Value.ToString() != "Unchecked" && oCell.Value.ToString() != "False")
{
check_ctr += 1;
}
}
lblselectedmsgfiles.Text = String.Format("{0} of {1} item selected", check_ctr,dgmsgfiles.RowCount);
}
Reply
Answers (
3
)
CSS Syntax Highlighting in RichTextBox or Another Tools
Opening windows appltn in the background at windows startup