I am currently working with a column chooser on a RadGridView. The column chooser is similar to the one found in Vladimir's blog. The problem is that as soon as I launch the column chooser, select all check box on the data grid is over written by an empty header. Can you please help me?
My first column is a telerik select all column:
<telerik:GridViewSelectColumn/>
<telerik:RadGridView Margin="0,25,0,0"
x:Name="TrancheList"
ItemsSource="{Binding Path=TrancheDataCollection}"
AutoGenerateColumns="False"
ScrollMode="Deferred"
SelectedItem="{Binding SelectedTranche, Mode=TwoWay}"
FrozenColumnCount="3"
Background="#FF91AEC9"
AlternationCount="2"
EnableRowVirtualization="True"
SelectionMode="Extended"
>
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu>
<telerik:RadMenuItem Header="Column Chooser" Click="RadMenuItem_Click"/>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
<inter:Interaction.Behaviors>
<beh:RadGridMultiSelectBehaviour SelectedItems="{Binding SelectedItems}"/>
</inter:Interaction.Behaviors>
<Window x:Class="AnalyticsDealsModule.Views.ColumnChooser"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Tranche List Column Chooser" Height="300" Width="400"
WindowStyle="SingleBorderWindow"
Topmost="True"
>
<Grid>
<Grid x:Name="LayoutRoot" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Available columns:" />
<ListBox ItemsSource="{Binding Columns}" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
</Window>
My first column is a telerik select all column:
<telerik:GridViewSelectColumn/>
<telerik:RadGridView Margin="0,25,0,0"
x:Name="TrancheList"
ItemsSource="{Binding Path=TrancheDataCollection}"
AutoGenerateColumns="False"
ScrollMode="Deferred"
SelectedItem="{Binding SelectedTranche, Mode=TwoWay}"
FrozenColumnCount="3"
Background="#FF91AEC9"
AlternationCount="2"
EnableRowVirtualization="True"
SelectionMode="Extended"
>
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu>
<telerik:RadMenuItem Header="Column Chooser" Click="RadMenuItem_Click"/>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
<inter:Interaction.Behaviors>
<beh:RadGridMultiSelectBehaviour SelectedItems="{Binding SelectedItems}"/>
</inter:Interaction.Behaviors>
<Window x:Class="AnalyticsDealsModule.Views.ColumnChooser"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Tranche List Column Chooser" Height="300" Width="400"
WindowStyle="SingleBorderWindow"
Topmost="True"
>
<Grid>
<Grid x:Name="LayoutRoot" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Available columns:" />
<ListBox ItemsSource="{Binding Columns}" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
</Window>