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....