Hi.
Normally I would do this to get specific rows:
Is there a way to skip the loop and add the datagridviewrowcollection based on a filter?
Something like:
Dim dgrv As New DataGridViewRowCollection(DataGridView1.Rows.Cast(Of DataGridViewRowCollection).Where(Function(y) y.Cast(Of DataGridViewRow).Where(Function(x) x.Cells("Online").Value = True)))
?
That is educational, ideally I would like to add, without a loop, filtered rows - specific cell value to a listof(string) . Is that possible?
Thanks.
Normally I would do this to get specific rows:
Code:
For Each row As DataGridViewRow In DataGridView1.Rows.Cast(Of DataGridViewRow).Where(Function(x) x.Cells("Online").Value = True )
...add to something
Something like:
Dim dgrv As New DataGridViewRowCollection(DataGridView1.Rows.Cast(Of DataGridViewRowCollection).Where(Function(y) y.Cast(Of DataGridViewRow).Where(Function(x) x.Cells("Online").Value = True)))
?
That is educational, ideally I would like to add, without a loop, filtered rows - specific cell value to a listof(string) . Is that possible?
Thanks.