Hello,
I've got a problem with filtering multiple columns in a RadGrid. The RadGrid code is shown below. Basically, the RadGrid below sets the CurrentFilterFunction property to default value, which is what we want. The issue is if a user changes the default filter function on multiple columns and attempts to filter based on those columns, it doesn't work because the first column filter that was changed will reset to the default CurrentFilterFunction value when the page posts back. Is there a way to save both filter function changes and allow the user to filter on multiple columns that way?
I've got a problem with filtering multiple columns in a RadGrid. The RadGrid code is shown below. Basically, the RadGrid below sets the CurrentFilterFunction property to default value, which is what we want. The issue is if a user changes the default filter function on multiple columns and attempts to filter based on those columns, it doesn't work because the first column filter that was changed will reset to the default CurrentFilterFunction value when the page posts back. Is there a way to save both filter function changes and allow the user to filter on multiple columns that way?
<
telerik:RadGrid
ID
=
"TasksGrid"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"TaskID"
HeaderStyle-Width
=
"95"
ItemStyle-Width
=
"95"
HeaderText
=
"Task ID"
SortExpression
=
"TaskID"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
GridRadComboFilter:GridRadComboFilter
DataField
=
"FlagID"
HeaderText
=
"Flag"
SortExpression
=
"FlagID"
HeaderStyle-HorizontalAlign
=
"Center"
HeaderStyle-Width
=
"50"
ItemStyle-HorizontalAlign
=
"Center"
ItemStyle-Width
=
"50"
/>
<
telerik:GridBoundColumn
DataField
=
"AssignedTo"
HeaderText
=
"Assigned To"
SortExpression
=
"AssignedTo"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Site"
HeaderText
=
"Site"
SortExpression
=
"Site"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Product"
HeaderText
=
"Product"
SortExpression
=
"Product"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SupportType"
HeaderText
=
"Support Type"
SortExpression
=
"SupportType"
CurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Issue"
HeaderText
=
"Reported Issue"
SortExpression
=
"Issue"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LastUpdatedText"
HeaderText
=
"Last Updated Text"
SortExpression
=
"LastUpdatedText"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
FilterControlWidth
=
"110px"
DataField
=
"LastUpdatedDate"
SortExpression
=
"LastUpdatedDate"
HeaderText
=
"Last Updated Date"
PickerType
=
"DatePicker"
DataFormatString
=
"{0:d}"
DataType
=
"System.DateTime"
></
telerik:GridDateTimeColumn
>
<
telerik:GridDateTimeColumn
FilterControlWidth
=
"110px"
DataField
=
"RequestedCompletionDate"
SortExpression
=
"RequestedCompletionDate"
HeaderText
=
"Req Completion Date"
PickerType
=
"DatePicker"
DataFormatString
=
"{0:d}"
DataType
=
"System.DateTime"
></
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
DataField
=
"Status"
HeaderText
=
"Status"
SortExpression
=
"Status"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
></
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>