I’ve made small demo on how to create column chooser for any RadGridView in few very simple steps:


1. Add new ChildWindow:


2. Define following XAML for the child window:

<Grid x:Name="LayoutRoot" Margin="2">
        <RowDefinition Height="Auto" />
        <RowDefinition />
    <TextBlock Text="Available columns:" />
    <ListBox ItemsSource="{Binding Columns}" Grid.Row="1">
                <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />


3. Set DataContext for the child window to be desired RadGridView:

public partial class ColumnChooser : ChildWindow
    public ColumnChooser(RadGridView grid)

        this.DataContext = grid;


4. Create and show the child window:

private void Button_Click(object sender, RoutedEventArgs e)
    new ColumnChooser(RadGridView1).Show();


The result:





About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks


Comments are disabled in preview mode.