Click here to Skip to main content
14,669,324 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Team,

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

Example:
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!

Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Rate this:
Please Sign up or sign in to vote.

Solution 2

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


this will get all of them.
   

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100