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
Madito Kevin
NA
8
2k
How to navigate to a record in Datagridview
Apr 6 2015 5:58 AM
I want to navigate to a record in Datagridview by selecting/click on a record without using a button click.
and display a record number,or current record number.
Please help here is my code snippet.
private void labelUpdate()
{
if (hwdg.SelectedRows.Count>=inc)
{
hwdg.FirstDisplayedScrollingRowIndex = inc;
hwdg.Rows[inc].Selected = true;
//inc++;
label27.Text = "Record" + (inc + 1) + " of " + ds2.Tables["tblComp"].Rows.Count;
}
else if(hwdg.SelectedRows.Count<=inc)
{
hwdg.Rows[inc - 1].Selected = true;
label27.Text = "Record" + (inc + 1) + " of " + ds2.Tables["tblComp"].Rows.Count;
}
}
Reply
Answers (
3
)
how to remove plus and minus symbols in treeview checkbox co
asp.net data table related due to adding colomn with default