Click here to Skip to main content
15,892,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir,

I am creating windows application, using data grid view in my data grid view some rows are empty, how to check my rows through loop.

Please any one guide me.

What I have tried:

How to loop through check datagrid rows are empty
Posted
Updated 29-Jun-18 6:13am

1 solution

C#
foreach (DataGridViewRow row in datagridview1.Rows)
{
    // check or modify as required.
}

See DataGridViewRowCollection.Item Property (Int32) (System.Windows.Forms)[^] for details.
 
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