Hello,
I am Using a XamGrid in SL4 v11.1, and when looping over the Grids Rows to retrieve the Selected Rows, I find that it works when the data is Flat and at Root level, but when grouping is applied, they are not picked up in the loop, and 0 Selected Rows are returned.
Is this a known issue or am I doing something wrong?
Many Thanks,
Matt
EDIT:
I tested this further, and notice that highlighting a selection of rows while grouping is applied then removing the grouping returns the right number of rows, so it appears that something in the grouping event is interfering with the rows from being flagged as selected.. unless they are being put into a Child collection somewhere, and brought back out into the flat collection when the grouping is removed...
Hello Matt,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
This worked brilliantly thankyou
Maybe as a future feature, the Childband selection could be a property set in Xaml to avoid code behind, but works just as well in a XamGrid behaviour definition,
Thanks again
I have created a sample project for you with the functionality you want. Basically I handled the XamGrid’s CellClicked event and in its handler I checked if the Cell is GroupByCell and if it is I loop trough all its child Rows and add them to the XamGrid’s SelectedRows collection. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
This worked perfectly, thank you.
Is there a XAML option to turn on SelectAll Grouped items when a Child Band is clicked?
thanks
Thank you for your post. I have been looking into it and I can suggest you use this code to retrieve the SelectedRows:
var selectedRows = xamGrid1.SelectionSettings.SelectedRows;
instead of looping all the Rows. Please let me know if this helps you or you need further assistance on this matter.