This is a migrated thread and some comments may be shown as answers.

Calculating using Filtered Rows

4 Answers 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 23 Feb 2017, 09:05 PM

I have a GridView that users will select rows in, and I would like to trigger calculations after they have filtered, and include ONLY the filtered rows in the calculation.

How do I trigger the calculations, and how do I select only filtered rows?

4 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 28 Feb 2017, 09:08 AM
Hello,

RadGridView exposes an Items property which represents a collection of the items after filtering, sorting and grouping operations have been applied upon RadGridView's ItemsSource. You can read more about the subject in this article.

You can use this collection to access only the filtered rows of your RadGridView.

Please let me know if this is what you're looking for.

Regards,
Dilyan Traykov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
William
Top achievements
Rank 1
answered on 28 Feb 2017, 01:59 PM

I need to be able to re-calculate a summary for the filtered rows.

I have added these statements but I DON'T get the event triggered when I filter. What else is necessary?

this.COCustomStatsGrid.Filtered += this.COCustomStatsGrid_Filtered;

private void COCustomStatsGrid_Filtered(object sender, GridViewFilteredEventArgs e)
{
}

0
Dilyan Traykov
Telerik team
answered on 01 Mar 2017, 01:32 PM
Hello,

I cannot think of a reason why the Filtered event would not get fired. Could you please share some code snippets or provide additional details regarding your setup, so that I can further guide you?

Regards,
Dilyan Traykov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
William
Top achievements
Rank 1
answered on 01 Mar 2017, 01:36 PM
Got it working
Tags
GridView
Asked by
William
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
William
Top achievements
Rank 1
Share this question
or