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
Ari
NA
8
50.8k
How to check if a selected row in a datagridview is empty(has no item)
Nov 4 2011 4:21 AM
Hey! First time poster here, first of all I wasn't sure if this is the right place to post but, how would I accomplish this? I've been trying the following:
if (dgvClient.SelectedRows.Count > 0)
{
DataGridViewRow currentRow = dgvClient.SelectedRows[0];
if (currentRow.Cells.ToString() != String.Empty)
{
//The code that will be here will open a form
}
else
{
MessageBox.Show("Select a non null row");
}
}
However, it doesn't appear to be working, and I'm out of ideas :/
Thanks for any help,
Ari
Reply
Answers (
3
)
Change Web config Values using C#.net tool
Url bane for parrental control in window forms