Datagrid multi-selected rows collection

  • Thread starter Thread starter Marc R.
  • Start date Start date
M

Marc R.

hi,
Is that such thing as selected collection exist ?

I need a way to select all selected rows into a datagrid then "unchecked"
the Active columns then save the result.

but as soon i modified 1 row all other row aren't selected any more
Do I have to build the rows collection my-self?

thanks,

Marc R.
 
Marc R. said:
hi,
Is that such thing as selected collection exist ?

I need a way to select all selected rows into a datagrid then "unchecked"
the Active columns then save the result.

but as soon i modified 1 row all other row aren't selected any more
Do I have to build the rows collection my-self?

thanks,

Marc R.
Here's how I did it, But i'm not convice that is the best way.

Dim cpt As Integer

Dim dgCol As DataGridColumnStyle

Try

dgCol = Me.grd_Client.TableStyles(0).GridColumnStyles(2)

For cpt = 0 To Me.DV.Count - 1

If Me.grd_Client.IsSelected(cpt) Then

Me.DV.AllowEdit = True

Me.DV.Item(cpt).Row.Item("Clt_Actif") = False

End If

Next

For cpt = 0 To Me.DV.Count - 1

Me.grd_Client.Item(cpt, 2) = False

Next

Catch ex As System.Exception

MsgBox(ex.Message + vbCrLf + "me.dv.count = " + Me.DV.Count + vbCrLf + _

"cpt = " + cpt)

End Try



Let Me know please is that is the only way.
 
Back
Top