Hello,
I am working on implementing a checkbox record selector for the XamDataGrid based on the blog post at http://es.infragistics.com/community/blogs/josh_smith/archive/2008/09/04/adding-checkboxes-to-the-record-selectors-in-xamdatagrid.aspx. Everything is working smoothly except for one issue. If you group the data and check the 'Select all' checkbox in the header for a group, all records get selected, including records outside of that group. Is there any workaround so that when a group's 'Select all' checkbox is clicked, it only selects/deselects all of the records in that particular group?
Thanks in advance.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. It works both with GroupBy records and hierarchies. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks for your response with the sample project, it looks like it will work for me.
Thank you for your post. I have been looking into it and I can suggest yo uadd the following Style for the RecordSelector:
<Style TargetType="{x:Type igDP:RecordSelector}"> <Setter Property="Visibility" Value="Collapsed"/> <Style.Triggers> <DataTrigger Binding="{Binding NestingDepth}" Value="0"> <Setter Property="Visibility" Value="Visible"/> </DataTrigger> </Style.Triggers> </Style>
Hope this helps you.
Another solution, set field layout settings per level in the hierarchy, and in the child level, hide the RecordSelector:
<igDP:FieldLayout.Settings> <!--Hide record selector in child level--> <igDP:FieldLayoutSettings RecordSelectorLocation="None"/> </igDP:FieldLayout.Settings>
enjoy,
Elisheva.
Hi Stefan,
I am new to using the xamgrid and wpf in general. I would like the IsSelected of the datarow to be selected /deselected based on the grouping. which I am more or less able to achieve. but then if i were to select the items individually from other groups it does not select. Your help on this will be very much appreciated.
I attached a copy of your code I was playing around with , grouping the records by age.
I would also like to use the filter option to be able to Select / Deselect the filtered item was not sure how to acheive that.
Regards,
Sunitha
Hello Sunitha,
Thank you for your post. I have been looking into it and I modified the sample I have been uploaded before, so I believe that now it has the functionality you want.
Thanks ever so much for your prompt response. Not exactly what I was after but I should be able to take it from here after the changes you have done. I am using a MVVM model and wanted the IsSelected of the Datarecord to be selected by grouping or otherwise.