The trigger I am using to hide both GridViewGroupRows and GridViewRows looks like this:
<
Style
TargetType
=
"{x:Type telerik:GridViewGroupRow}"
>
<
Setter
Property
=
"Visibility"
Value
=
"Visible"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Group.Key, RelativeSource={RelativeSource Self}}"
Value
=
"SomeValue"
>
<
Setter
Property
=
"Visibility"
Value
=
"Collapsed"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
I do not want to filter results because I need them for aggregate results in the groups and the footer. So how can I hide specific GridViewRows without filtering the data?
8 Answers, 1 is accepted
Setting rows Visibility is not recommended since the rows virtualization will use this property and the result can be unpredictable.
Greetings,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

I tried using a blank item template, and removing the item from the GridViewVirtualizingPanel, however neither of those appeared to work.
Or as an alternative, can I get the current group query from somewhere so I can query another collection in the AggregateResultsList and add my own data to group summaries?
You can use the grid filtering (or outside of the filtering) to filter rows. As to aggregates you can write complete custom aggregate functions or you can define custom footers. Please check our demos for more info.
Kind regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

I can add regular aggregates, but if I filter the data then the aggregates aren't correct since the data I am trying to aggregate is filteredout. I can also add a custom value to the Group Rows, but I don't know how to get the query that defines what that group contains so I can query the 2nd data source for the correct value.
Its important that I have the aggregate totals in the Group Rows too, not just the Footer
The custom aggregates demo can be found here:
http://demos.telerik.com/silverlight/#GridView/CustomAggregates
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

It creates a custom Aggregate based on currently visible rows. I am looking to create an aggregate based on non-visible rows. Since I cannot hide rows, I am guessing this is not possible with your GridView.
The example shows how to create custom aggregates. You can modify it to serve your needs.
Kind regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

My data rows are either Credits and Debits. I wish to only show the Debits rows, but to provide aggregate totals showing both Credits and Debits. Users can group by any number of fields they want, and they need to be able to see both the total Credits and Debits for that group, however when expanding to view the raw data they only want to see Debit rows.
I thought it would be easy to simply hide the Credit rows based on a trigger, however it turns out hiding a record still leaves a blank space where the record should be. I cannot Filter the data to exclude all Credit rows, because then the Credits would always show up as $0.00 in the aggregate totals.
I do not see how a custom aggregate would help, however just in case I did try copying the code to my project and now I keep getting a run-time error that says:
No generic method 'StdDev' on type 'MyNamespace.Statistics' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
The only changes I made was to replace double with Decimal.