I am trying to add filters to a RadGrid and am encountering a bug when filtering numeric columns.
Only for columns which are numeric (Int32 for Plant and Demand in this case), the filter does not apply on the first try. After page load, the first filter on a numeric column simply has no effect. Any subsequent filter attempt works properly.
This bug does not occur on the date columns nor string columns, as they filter properly.
The data is being loaded by an data object during the NeedDataSource event. This is the only code behind at the moment.
I am using the most up to date Telerik with ASP.NET 3.5.
Please see code snippet below:
Thanks,
Andy
Only for columns which are numeric (Int32 for Plant and Demand in this case), the filter does not apply on the first try. After page load, the first filter on a numeric column simply has no effect. Any subsequent filter attempt works properly.
This bug does not occur on the date columns nor string columns, as they filter properly.
The data is being loaded by an data object during the NeedDataSource event. This is the only code behind at the moment.
I am using the most up to date Telerik with ASP.NET 3.5.
Please see code snippet below:
<
telerik:RadGrid
runat
=
"server"
ID
=
"grdOrders"
AllowPaging
=
"True"
AllowSorting
=
"True"
Skin
=
"Web20"
onneeddatasource
=
"grdOrders_NeedDataSource"
GroupingSettings-CaseSensitive
=
"false"
AllowFilteringByColumn
=
"true"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
>
<
Columns
>
<
telerik:GridNumericColumn
DataField
=
"PlantID"
HeaderText
=
"Plant #"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
ShowFilterIcon
=
"false"
SortExpression
=
"PlantID"
UniqueName
=
"PlantID"
DataType
=
"System.Int32"
>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"Demand"
HeaderText
=
"Demand"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
ShowFilterIcon
=
"false"
SortExpression
=
"Demand"
UniqueName
=
"Demand"
DataType
=
"System.Int32"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"OrderEntryDate"
HeaderText
=
"Order Date"
CurrentFilterFunction
=
"EqualTo"
ShowFilterIcon
=
"false"
DataFormatString
=
"{0:MM/dd/yyyy}"
PickerType
=
"DatePicker"
FilterControlWidth
=
"95px"
AutoPostBackOnFilter
=
"true"
SortExpression
=
"OrderEntryDate"
UniqueName
=
"OrderEntryDate"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
DataField
=
"CreatedBy"
HeaderText
=
"Created By"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
ShowFilterIcon
=
"false"
UniqueName
=
"CreatedBy"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowColumnsReorder
=
"True"
ReorderColumnsOnClient
=
"True"
>
</
ClientSettings
>
</
telerik:RadGrid
>
Thanks,
Andy