Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Programmatically expand group after programmatically grouping
posted

Hi.

We're using the XamDataGrid and are trying to programmatically group the grid by a column, directly followed by expanding/collapsing certain groups. We use the following code to perform the grouping:

dataGrid.FieldLayouts[0].SortedFields.Clear();
dataGrid.FieldLayouts[0].SortedFields.Add(
new FieldSortDescription{
       FieldName =
"Category",
       IsGroupBy =
true
});

We then loop through the xamDataGrid.Records (which should all now be of type GroupByRecord), and mark them as either expanded or not. Both actions (the grouping and expansion/collapsing) work, but not both at the same time. The problem with the expansion/collapsing is that the records have not yet become GroupByRecords.

It seems like the sorting/grouping occurs asynchronously and we have not been able to find an event that fires when the sorting/grouping finishes. (There's a Grouped event and such, but that only fires when the grouping is triggered by the end user).

 Any help is appreciated!

Lars Andreas

 

Parents Reply Children
No Data