9 Answers, 1 is accepted
Thank you for writing.
The filtered, sorted or grouped rows can be found in the ChildRows collection of the desired template. So in order to select the first row after the filtering operation, please consider the following code:
radGridView1.ChildRows[0].IsSelected =
true
;
I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.
Kind regards,
Stefan
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.
I am glad that I could help. If there is anything else we can assist you with, do not hesitate to contact us.
All the best,
Stefan
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.
Could I get an answer for Cory's second question? I am trying to get the rows that are visible in the gridview after filtering has been applied.
interating with row.isvisible and row.selected dont seem to work.
Thanks,
Chris
The filtered, sorted or grouped rows can be found in the ChildRows collection of the desired template. The currently visible rows can be found in radGridView1.TableElement.VisualRows. Please note that the latter collection contains of GridRowElement objects and you need to access their RowInfo property to access the actual data row.
Greetings,
Stefan
the Telerik team
Using Silverlight and MVVM, we have a RadGridView where users can filter rows. That works great, only the rows that meet the filter display in the RadGridView.
But we also have a checkbox on top of the RadGridView to "Select All" rows. When checked, a method in our ViewModel is called to perform a ForEach() over the Observable that is bound to the ItemsSource of the RadGridView. However, we can't tell which row is filtered by the UI control, so all rows get checked, which is wrong.
How can we read the RadGridView ChildRows property from a ViewModel?
Thank you for writing.
I would like to note that this forum is related to the Telerik UI for WinForms suite. However, your question seems to be related to Silverlight. Feel free to post your inquiries in the relevant forum: https://www.telerik.com/forums
I hope this information helps.
Regards,
Dess
Progress Telerik
Hi,
I have radgrid view with thousands of records. Grid has paging enabled with 50 records per page. I am using built-in filter option to filter some data. The result can be more than 50 records, hence more than 1 page. I need to perform some action on the backend on all filtered records.
How do I get a list of all filtered records? I tried your suggestion ChildRows, but it returns up to 50 rows. Looks like it is just list of records currently visible on a page. I need to get all filtered records, no matter how many pages there are. Is it possible and how? If this is not possible, is it possible hook up to events of filter changes and get all parameters of filters so I can apply filter to the binded dataset myself?
When paging is enabled, the ChildRows collection contains the data rows displayed on the specific page. In order to get all filtered data, you can first disable the paging, iterate the ChildRows collection and enable again the paging.
Alternatively, the MasterTemplate.DataView.Indexer.Items contains all the rows in the order in which they appear in the grid.
foreach
(GridViewRowInfo row
in
((GridDataView)grdDummy.MasterTemplate.DataView).Indexer.Items)
{
Console.WriteLine(row.Cells[1].Value);
}
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik