After a few hours of searching the internet on the error "Specified argument was out of the range of valid values", I discovered that the cause was the GridTemplateColumn behaving differently that a GridBoundColumn with regards to filtering. In the code snippet below, you can use the one filter just fine. If you change the telerik:GridTemplateColumn (column 2) to AllowFiltering='true' while having a <FilterTemplate> element, using the filter on column 3 will throw an error. AllowFiltering='true' doesn't cause a problem if there's no <FilterTemplate> element. Note that changing the GridBoundColumn ( column 1) between AllowFiltering= true/false doesn't cause an issue. It's only the GridTemplateColumn type.
The different behavior between the GridBoundColumn and GridTemplateColumn types seems like a bug.
<
telerik:RadGrid
runat
=
"server"
DataSourceID
=
"sql_tables"
AllowFilteringByColumn
=
"true"
AutoGenerateColumns
=
"false"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"name"
HeaderText
=
"name"
AllowFiltering
=
"true"
UniqueName
=
"name1"
>
<
FilterTemplate
>
custom filter template on GridBoundColumn is OK
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"name"
HeaderText
=
"name-template"
AllowFiltering
=
"false"
UniqueName
=
"name2"
>
<
ItemTemplate
>
<%#Eval("name") %>
</
ItemTemplate
>
<
FilterTemplate
>custom filter on GridTemplateColumn breaks filtering.</
FilterTemplate
>
<
HeaderStyle
BackColor
=
"Pink"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"type"
HeaderText
=
"type"
AllowFiltering
=
"true"
UniqueName
=
"type"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
runat
=
"server"
ID
=
"sql_tables"
ConnectionString="<%$ ConnectionStrings:MyDB%>" SelectCommand="select top 4 name, object_id, schema_id, type, type_desc from sys.tables" />