Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Team,

while selecting multiple rows in datagridview vb.net some rows not executing in for loop.

Example:
SQL
For item As Integer = 0 To DataGrid.RowCount - 1 Step 1
                    If DataGrid.Rows(item).Selected Then
Posted
Comments
CHill60 9-Jul-14 8:26am    
How are you selecting the rows? They are all highlighted?
Which rows are not being included in the loop?
What are you doing after that If statement?
CHill60 9-Jul-14 8:49am    
If you need to update your question then use the Improve Question link in green (bottom right of your post). Do not post as a new question!

 
Share this answer
 
you can do a
Foreach (Datagridrow row in DataGrid.SelectedItems)
{
}


this will get all of them.
 
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