I'm defaulting a grid to be grouped by a boolean value within the binding data set.
When grouped, the group-headers read something like: "True (98 items)" and "False (122 items)"
Can this be altered to read: "Yes (98)" and "No (122)" ?
In the DataSourceChanged event, I can count the items in each group and use that information to update the items count in the description. This will work for my scenario. Thank you for your help!
Thank you. I see the same issue here where the description is unchanged when loading a new dataset using the new approach.
I'll see if I can find a workaround for this scenario
Hello PMac 007,
I believe you should be able to utilize the DataSourceChanged event of the XamDataGrid to catch the change of your data and update the GroupByRecords.
Thank you. I see InitializeRecord is called when a new dataset is loaded, but "e.Record is GroupByRecord" does not qualify as True any longer, so the description update is skipped.
For your above recommendation, which event would you apply the new approach?
I believe this is happening because the InitializeRecord event is not firing again in that case, and the GroupByRecords are likely being reused, but the Description is explicitly being set rather than letting the control do it and so it isn't updating. In that case, I would recommend looping the XamDataGrid.Records collection. The root level should be the GroupByRecords and you can then change the Description again there, using the ChildRecords collection of the GroupByRecord element to determine the count to be shown.
Please let me know if you have any other questions or concerns on this matter.