Hello,
I am searching for a function which will return all rows that are visible in UltraGrid without looping through the rows.
My requirement is, on the click of a button 'select All' I want to select all the rows in the grid except for the one which are hidden.
The code that I am using is
Dim rows As UltraWinGrid.UltraGridRow() = Me.ulGridEstimateDetail.Rows.GetAllNonGroupByRows()Me.ulGridEstimateDetail.Selected.Rows.AddRange(rows)
This selects all the records(both visible and hidden).
Is there a function or any work around that will return a collection of all visible rows in ultrawingrid.
I want to avoid loops since I'm working with more than 13000 records.
Thanks,Shambu Sathyan
Hello Shambu,
You could achieve that through the following code:
ultraGrid1.Selected.Rows.AddRange(ultraGrid1.Rows.Where(r => !r.Hidden).ToArray<UltraGridRow>());
Please feel free to let me know if a question about our toolset comes up on your mind.
Hello Boris,
We are using Infragistics v10.3 and it does not seems to support 'where' in row collection.I am getting the following error on using the code that you provided.
'Where' is not a member of 'Infragistics.Win.UltraWinGrid.RowsCollection'.
I converted the code to vb.net since I'm using vb.net.
Dim rows As UltraWinGrid.UltraGridRow() = Me.ulGridEstimateDetail.Rows.Where(Function(r) Not r.Hidden).ToArray(Of UltraGridRow)()
Do I need to import any thing to work with toolset. And can you provide me some details on toolset.
Please suggest me further changes.