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
mohammed shamsheer
NA
394
144.4k
object Reference is set to instance of an object
Dec 5 2014 5:18 AM
for (int j = 0; j < dgvcheckin.Rows.Count; j++)
{
if (Convert.ToBoolean(dgvcheckin.Rows[j].Cells["RoomNo"].Value) == null)
{
dgvcheckin.Rows.Remove(dgvcheckin.CurrentRow);
}
}
int NumberofRooms=1;
for (int j = 0; j < dgvcheckin.Rows.Count;j++ )
{
if (dgvcheckin.Rows[j].Cells["RoomNo"].Value.ToString() != "" || dgvcheckin.Rows[j].Cells["RoomNo"].Value != null)
{
NumberofRooms=+NumberofRooms;
}
}
This is my code when compiler check the datagridview room cell it give back null then it going to exception and skip the remaining the code any body have any idea....
Reply
Answers (
7
)
License key in c#.net desktop application
There is no row at position 0.