Click here to Skip to main content
15,906,081 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre>I have a datagridview,I Want when a data row is bound to data in a GridView, check the value of a column of each row that is empty or not. Windows Forms does not have such a RowDataBind Event. Therefore, what function should I use?!
Posted

C#
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
    if (dataGridView1.Columns[e.ColumnIndex].Name == "")
    {
        if (dataGridView1[e.ColumnIndex, e.RowIndex].Value == null)
        { 
            // Action
        }
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900