This is a migrated thread and some comments may be shown as answers.

Grid filtering not working for one column

1 Answer 480 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Jats
Top achievements
Rank 1
Jats asked on 26 Aug 2016, 03:50 AM

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>

1 Answer, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 26 Aug 2016, 07:53 PM
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.
Tags
Filter
Asked by
Jats
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Share this question
or