RadGrid Filtering Demo issue

2 posts, 0 answers
  1. Johnathan
    Johnathan avatar
    40 posts
    Member since:
    Sep 2012

    Posted 01 Jan 2013 Link to this post


    I'm attempting to use the RadGrid filtering with the RadFilter demo to recreate the example myself but unfortunately the filter doesn't apply at all when I attempt to apply it. Here's a copy of the aspx page:

    <form id="PageForm" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
                    <telerik:AjaxSetting AjaxControlID="RadFilter1">
                            <telerik:AjaxUpdatedControl ControlID="RadFilter1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                            <telerik:AjaxUpdatedControl ControlID="SqlDataSource1" />
            <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel>
            <div class="filterDiv">
                <telerik:RadFilter runat="server" ID="RadFilter1" FilterContainerID="RadGrid1" ShowApplyButton="false"></telerik:RadFilter>
            <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false" DataSourceID="SqlDataSource1"
                AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" OnItemCommand="RadGrid1_ItemCommand">
                <MasterTableView IsFilterItemExpanded="false" CommandItemDisplay="Top">
                        <telerik:RadToolBar runat="server" ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick">
                                <telerik:RadToolBarButton Text="Apply filter" CommandName="FilterRadGrid" />
                        <telerik:GridNumericColumn DataField="PreferenceID" HeaderText="PreferenceID" />
                        <telerik:GridNumericColumn DataField="UserID" HeaderText="UserID" DataType="System.Int32" />
                        <telerik:GridNumericColumn DataField="SiteID" HeaderText="SiteID" DataType="System.Int32" />
                        <telerik:GridBoundColumn DataField="Value" HeaderText="Value" />
            <asp:SqlDataSource runat="server" ID="SqlDataSource1" SelectCommand="Select PreferenceID, UserID, SiteID, Value FROM iWeb..TAB_Preference"
            ConnectionString="<%$ ConnectionStrings:iWeb %>"  />

    Here's the code-behind page:

    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
        If e.CommandName = "FilterRadGrid" Then
        End If
    End Sub
    Protected Sub RadToolBar1_ButtonClick(ByVal source As Object, ByVal e As RadToolBarEventArgs)
    End Sub

    Here's a link to the example I'm using:


    Any help would be greatly appreciated.

  2. Vasil
    Vasil avatar
    1640 posts

    Posted 02 Jan 2013 Link to this post

    Hi Johnathan,

    The code shown under the demo is the same used for the demo itself. So it should work without any problem. You can open the live demos project form the installation folder of your controls and to run the same page from there and/or strip the code directly from.
    C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2012\Live Demos\Filter\Examples\Integration
    We could not say what is the problem without having your datasource and runnable version that can be tested. Since the code in the site is working correctly, it is something up to your datasource, settings or something in copying the code was went wrong.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top