Hi,
When ever I call GroupDescriptors.Reset() on the radgridview, the scroll bar is reset to the top.
Is there a way to avoid this.
I call groupdescriptor reset whenever one of the bound data changes and I need the group aggregate functions to trigger. Otherwise the aggregate function fails to update.
Thanks.
4 Answers, 1 is accepted
Using EditItem and CommitEdit is causing another issue. This does not update the background color of the group header row.
Only resetting the group descriptor updates the group header row color but that cause the grid to scroll back to the top.
Can you kindly suggest a workaround?
I am using the following code to set color of the group header row based on the values in the grouped row.
<
Style
TargetType
=
"telerik:GroupHeaderRow"
>
<
Setter
Property
=
"ShowGroupHeaderColumnAggregates"
Value
=
"True"
/>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"False"
/>
<
Setter
Property
=
"Background"
Value
=
"{Binding Items,Converter={StaticResource GroupConverter}}"
/>
</
Style
>
The ScrollBar is Reset as a CollectionChanged notification with action Reset is raised in that case. If the Action is Add or Remove, then it should stay as it is.
In that way, I am afraid this behavior cannot be prevented and you should save the scroll position and then scroll back to it as suggested in this forum thread.
As to updating the GroupRow's Style, I would suggest you specifying a GroupRowStyleSelector to return the proper Style. You can check the topic on Style Selectors for more information on this.
Regards,
Dimitrina
Telerik
See What's Next in App Development. Register for TelerikNEXT.