I need to hide the filter icon, enable the AutoPostBackOnFilter and set the default filter function value.The default filter function may be different for each column depending on what the client wants.
I have a problem.
When the application loads, the filters are exactly what I specified in the CurrentFilterFunction property.
When I filter the first column, the filters reset to something else.
<
telerik:RadGrid
AutoGenerateColumns
=
"false"
ID
=
"RadGrid1"
DataSourceID
=
"SqlDataSource1"
AllowFilteringByColumn
=
"True"
PageSize
=
"15"
AllowPaging
=
"True"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridNumericColumn
DataField
=
"OrderID"
HeaderText
=
"OrderID"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"LessThanOrEqualTo"
/>
<
telerik:GridBoundColumn
DataField
=
"ShipName"
HeaderText
=
"ShipName"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
/>
<
telerik:GridDateTimeColumn
DataField
=
"OrderDate"
HeaderText
=
"OrderDate"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"LessThanOrEqualTo"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders" runat="server">
</
asp:SqlDataSource
>
In this example, when I filter the shipName with the letter 'a', it is filtered correctly with the "Contains" filter expression.
Then I filter the OrderId with the value 10300.
I expect the filter function to be "LessThanOrEqualTo" as I specified, but instead, it is set to "EqualTo".
Is it a bug ?
Is there a workaround ?