Hi,
I have created a RadGridView with a couple of columns (one of them being GridViewSelectColumn). I have also created a GroupDescriptor with GroupHeaderTemplate and I would like to add a GridViewCheckBox to the GroupHeaderTemplate, so I can select all items in a particular group by one click, however, the GridViewCheckBox is not enabled. I tried different properties on the control, but none of them works for me.
If I add just a CheckBox then it works, but it does not have the style I need and I would not like to reproduce the Style already present on GridViewSelectColumn.
Can you advise how to enable the GridViewCheckBox ?
Thanks
<telerik:RadGridView Grid.Row="1" ItemsSource="{Binding Collection}"
AutoGenerateColumns="False"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
Padding="10"
IsReadOnly="True"
FrozenColumnsSplitterVisibility="Collapsed"
IsFilteringAllowed="False"
SelectionUnit="FullRow"
SelectionMode="Extended">
<telerik:RadGridView.GroupHeaderTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<telerik:GridViewCheckBox VerticalAlignment="Center" HorizontalAlignment="Center">
</telerik:GridViewCheckBox>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="DemiBold"
Margin="10 0 0 0"
Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type telerik:GridViewGroupRow}},
Path=Group.Key}" />
</StackPanel>
</DataTemplate>
</telerik:RadGridView.GroupHeaderTemplate>
<telerik:RadGridView.GroupDescriptors>
<telerik:GroupDescriptor Member="Id"
SortDirection="Ascending" />
</telerik:RadGridView.GroupDescriptors>
<telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn/>
<telerik:GridViewDataColumn Header="Date" MinWidth="150"
DataMemberBinding="{Binding RollDate}" />
<telerik:GridViewDataColumn Header="ID" MinWidth="100"
DataMemberBinding="{Binding Id}" />
<telerik:GridViewDataColumn Header="Name" MinWidth="220"
DataMemberBinding="{Binding Name}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
I just responded to the other thread that you opened. To avoid duplicate content, let us please continue any further communication on the matter there.
Thank you in advance for your cooperation and understanding.