Hi
I have a multi level grouping (let's say two groups) and one of the column is Checkbox column.
My functionality is when I select the checkBox in Header column I should be able to loop through all the group row level checkboxes and select all the check boxes in group level rows.
and when I select the checkBox in group1 (let's main group) I should be able to loop through all the sub-group level checkboxes and select all the check boxes in sub-group level rows.
I am able to select the corresponding checkBoxes in the actual data rows on the selection of Header checkbox/main group checkbox/Sub-group checkbox but could not get hold of group level checkboxes.
Can some please help on this?
Thanks
Sayap
Georgi,
Yes, thanks. It's working.
Chris
Hi,
It's there, but it's hidden from the intellisense (and the API docs) on purpose, as it's supposed to be used for internal purposes only.
You should be able to use it though. Did you try the snippet I provided?
Regards,
I am using Silverlight XamGrid and while checking on the API, I can't find the Row.Manager class inside your foreach code snippnet.(http://help.infragistics.com/Help/Doc/Silverlight/2011.1/CLR4.0/html/InfragisticsSL4.Controls.Grids.XamGrid.v11.1~Infragistics.Controls.Grids.RowBase_members.html)
Please advise if I am doing anything wrong.
Assuming your checkbox is defined in the header using a HeaderTemplate:
<ig:CheckBoxColumn Key="Bool"> <ig:CheckBoxColumn.HeaderTemplate> <DataTemplate> <CheckBox Click="CheckBox_Click" /> </DataTemplate> </ig:CheckBoxColumn.HeaderTemplate> </ig:CheckBoxColumn>
You can access all rows in the given collection with the following code:
private void CheckBox_Click(object sender, RoutedEventArgs e) { CheckBox cb = (CheckBox)sender; HeaderCellControl cell = (HeaderCellControl)cb.Parent; foreach (RowBase row in cell.Cell.Row.Manager.Rows) { if (row.RowType == RowType.DataRow) { ((MyDataObject)row.Data).Bool = (bool)cb.IsChecked; } } }
Hope this helps,
Infragistics team,
Any update?