Hi,
I have a checkbox in the field header in my XAMDatagrid.
I have handled the checked and unchecked events so that when I check/uncheck I can set the checkboxes in the records accordingly.
But when I select/unselect the checkboxes in the records, I have to change the value of the SelectAll checkbox in the header. How can I achieve this?
Regards,
Poornima
Hi Krasimir,
Your solution works for me except one problem I am facing if row is filter still it's selecting that row.
Do you have and solution for that?
Hey I like this solution, but is there a way to preserve the column selection tool and have a select all checkbox at the same time?
Hi Krasimir
Your solution works well for me when the data is already in the grid when the checkbox loaded event is fired but what about when new records are added? How do I get a reference to the correct header checkbox to tag the new records?
Thanks
Jeff
Hello Efachel,
Thank you for your reply. I have been looking into the behavior that you have describe and I assume that by line you are referring to the Records in the XamDataGrid. If my assumption is correct, the behavior that you have described is expected, since the CheckBoxes are bound to the IsSelected property of their corresponding Records. When you have several selected records in the xamDataGrid and you click on other record, the SelectedItems.Reocrds collection is cleared and the clicked record becomes active. What I can suggest is to set the CellClickAction of the FieldSettings of the XamDataGrid to SelectRecord. By doing so, when you have some selected records and you click on unselected record the selection will clear, but the clicked record will be selected and its CheckBox will be checked. I have attached a modified sample application.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I use your sample, but get a problem.
When I click a line, all checkbox are unchecked.
How can I fix it?