I'm using telerik radgrid to make an app. One of the columns is set as a template column:
<telerik:GridTemplateColumn DataField="CustomerID" DataType="System.Int32" FilterControlAltText="Filter CustomerID column" HeaderText="Customer" SortExpression="CustomerID" UniqueName="CustomerID">
<InsertItemTemplate>
<asp:DropDownList ID="ddlInsertCustomer" runat="server" DataSourceID="SqlDataCustomers" DataTextField="customerName" DataValueField="id" SelectedValue='<%# Bind("CustomerID") %>'>
</asp:DropDownList>
</InsertItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlCustomer" runat="server" DataSourceID="SqlDataCustomers" DataTextField="customerName" DataValueField="id" SelectedValue='<%# Bind("CustomerID") %>'>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="CustomerIDLabel" runat="server" Text='<%# Eval("CustomerID") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
In the backend on the databound I set the text of this column to the name of the Customer which I get through a linq query to a seperate table.
The problem is in the filtering when I try to filter the table is expecting the id and not the name. Does anyone know how to filter by the text in the column instead of the value?