Since our RadGrid for ASP.NET AJAX filter row is very popular, I’ve made small demo how to achieve the same in RadGridView for Silverlight:

Untitled 

To turn on this for your grid you can simply set GridViewFilterRow.IsEnabled attached property:

<UserControl x:Class="CustomFilterRow.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerikGridViewFilter="clr-namespace:Telerik.Windows.Controls.GridView.Filter" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadGridView x:Name="RadGridView1" AutoGenerateColumns="False"
            telerikGridViewFilter:GridViewFilterRow.IsEnabled="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn HeaderText="ID" DataMemberBinding="{Binding ID}" />
                <telerik:GridViewDataColumn HeaderText="Name" DataMemberBinding="{Binding Name}" Width="300" />
                <telerik:GridViewDataColumn HeaderText="Date" DataMemberBinding="{Binding Date}" DataFormatString="{}{0:d}" Width="120" />
                <telerik:GridViewDataColumn HeaderText="UnitPrice" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c2}" Width="120" />
                <telerik:GridViewDataColumn HeaderText="Discontinued" DataMemberBinding="{Binding Discontinued}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>


Enjoy!

[Download]


About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks

Comments