Filter string on template column bound by int

2 posts, 0 answers
  1. Arsalan Ansari
    Arsalan Ansari avatar
    10 posts
    Member since:
    Jan 2010

    Posted 14 Jul 2010 Link to this post

    i have a RadGrid with some template columns that are bound by a SQL relationship ID that i want to filter by the Name instead.

    For example, my orders table is connected to the drivers table via the DriverID.  On the EditItemTemplate, i have a rad combo box that is linked to the list of drivers and the selectedvalue inserts the DriverID in the RadGrid but for the ItemTemplate, it is simply a label that displays the DriverName

    However, Filtering only allows me to filter by DriverID, i want to be able to Filter by DriverName

    How can i do this?

    <telerik:GridTemplateColumn HeaderText="Driver" DataField="DriverID" SortExpression="Driver">
                            <asp:Label runat="server" ID="lblDriver" Text='<%# Eval("DriverName") %>'></asp:Label>
                            <telerik:RadComboBox ID="rcbDrivers" runat="server"
                                                                 DataTextField="DriverName" SelectedValue='<%# Bind("DriverID") %>'

  2. Tsvetoslav
    Tsvetoslav avatar
    1823 posts

    Posted 16 Jul 2010 Link to this post

    Hello Arsalan,

    Attached is a small sample demonstrating how to achieve your requirement.

    Hope it helps.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top