hi everyone i'm a new coder here , i'm coding for a datagridview and have to check a row of data in the datagridview , but the problem is the datagridview must be enabled , and the selected cell will be automaticly on the first cell and the first row , if i use this code in the cells , not row , it shows an error , can someone help me to make an anti error if someone use this code when the selected item is cells and not row
if (dataGridView1.SelectedRows.Count < 0==true)
{
MessageBox.Show("Pick the data first!");
}
When i Clicked Update Which Have The Code Above
it Shows This Error
But when i Selected the Full Row and Clicked The Update Button , it Works Normally and No error