Telerik blogs

I’ve made small demo on how to save and restore various RadGridView settings using ApplicationSettingsBase.
To turn on this for your grid you can simply set RadGridViewSettings.IsEnabled attached property:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:ts="clr-namespace:Telerik.Settings" Title="Window1">
<
Grid>
<
Grid.Resources>
<
ObjectDataProvider x:Key="customers"
ObjectType="{x:Type local:NorthwindDataContext}" MethodName="get_Customers">
</
ObjectDataProvider>
</
Grid.Resources>
<
telerik:RadGridView ts:RadGridViewSettings.IsEnabled="True" x:Name="RadGridView1"
ItemsSource="{Binding Source={StaticResource customers}}"/>
</
Grid>
</
Window>


Saved settings are:

  • Sorting
  • Grouping
  • Filtering
  • Frozen columns
  • Columns width and order


Enjoy!

[Download]


About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks

Comments

Comments are disabled in preview mode.