This question is locked. New answers and comments are not allowed.
I have checkboxes as a column in my Datagrid.
When I do a group by I need to add a CheckBox that would select the grouped checkboxes...
I can't get it to show up... I've added this code in teh datagrid.Grouped event handler
I've tried two different code blocks.
This one results in an empty GroupByBox (well it has the sort arrow and the close but no DisplayContent
When I do a group by I need to add a CheckBox that would select the grouped checkboxes...
I can't get it to show up... I've added this code in teh datagrid.Grouped event handler
I've tried two different code blocks.
This one results in an empty GroupByBox (well it has the sort arrow and the close but no DisplayContent
TextBlock tb = new TextBlock();
string sGroup = dataGrid.GroupDescriptions[0].DisplayContent.ToString();
tb.Text = sGroup +
"AA";
dataGrid.GroupDescriptions[0].DisplayContent = tb;
This one keeps the ColumnName and adds the CheckBox.. but it adds the string representation of the checkbox... so it looks like this...
"Column A System.Window.Controls.Checkbox Content:IsChecked:False"
CheckBox cb =
new CheckBox();
string sGroup = dataGrid.GroupDescriptions[1].DisplayContent.ToString();
dataGrid.GroupDescriptions[1].DisplayContent = sGroup + cb; ;