hi,
i have a datagrid view in VS 2008 standard edition,how can i check if there is no value entered in the cell,
how can i write the code.???

please give me and answer someone,

thanxxx

Re: how to check whether a datagridview cell value is null 80 80

You can use:

if ((string)dataGridView1.Rows[RowIndex].Cells[cellIndex].Value != string.Empty)
Re: how to check whether a datagridview cell value is null 80 80
/--- myCell is a Cell object

if (myCell.Value == null && myCell.Formula == "")
{
    //--- Cell is empty
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.