Grid filtering not working for one column

2 posts, 0 answers
  1. Jats
    Jats avatar
    1 posts
    Member since:
    Aug 2016

    Posted 25 Aug Link to this post

    My grid is setup as below, the grid contains 10 columns where as the filtering doesn't work for only ID column,please help.....
    The datatype is int32 and tried with the option but no luck....

    <telerik:RadGrid 
            ...
            AllowMultiRowSelection="false" 
            AllowFilteringByColumn ="true"
            runat="server" 
            AllowSorting="true" 
            AllowPaging="true" 
            GridLines="None" 
            EnableHeaderContextMenu="true">
            <MasterTableView 
                ...
                <Columns>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn 
                        UniqueName="ID" 
                        SortExpression="ID" 
                        HeaderText="ID" 
                        DataField="ID" 
                        Groupable="false" 
                        AllowFiltering="true" 
                        AutoPostBackOnFilter="true" 
                        CurrentFilterFunction="Contains" 
                        FilterControlWidth="30px" 
                        FilterControlToolTip="Filter grid by ID" 
                        FilterControlAltText="Filter grid by ID">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblID" Text='<%# Eval("ID") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn 
                      .........
                    </telerik:GridTemplateColumn>

  2. Patrick
    Admin
    Patrick avatar
    172 posts

    Posted 26 Aug Link to this post

    Hello Jats,

    Due to the datatype being a numeric you should set the "CurrentFilterFunction" to "EqualTo" instead of "Contains", or remove "CurrentFilterFunction".  The column will assume the filter operation depending on the type.

    For information pertaining to Filtering Options, please check out our helpful documentation.  

    I hope this helps!

    Regards,
    Patrick
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top