Filtering with dropdown column not working

2 posts, 0 answers
  1. LJZIMMERMAN
    LJZIMMERMAN avatar
    5 posts
    Member since:
    Oct 2011

    Posted 29 Sep Link to this post

    I have a dropdown column and am filtering the grid.  The drop down has an ID field and a text field, as you would expect.

    The filter is actually looking for the ID field, rather than the value field. What happens is when I try to enter a character search, the filter recognized the value entered should be numeric and rejects the search.

     <telerik:GridDropDownColumn
    DataField="RequestTypeID"
    DataType="System.String"
    FilterControlAltText="Filter RequestType column"
    HeaderText="Request Type"
    Allowfiltering="true"
    ShowFilterIcon="true"
    CurrentFilterFunction="Contains"
    SortExpression="RequestTypeID"
    UniqueName="RequestTypeID"
    ListValueField="RequestTypeID"
    ListTextField="RequestType"
    DataSourceID="SqlDataSource2">
    </telerik:GridDropDownColumn>

    Help, please.

     

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 04 Oct Link to this post

    Hello,

    The built-in GridDropDownColumn is filtered by its ListValueField when the default filtering feature of the control is used. RadGrid does not include any support for filtering by ListTextField instead.

    This limitation is because the filtering mechanism relies on the DataField of the filtered column and for GridDropDownColumn this property specifies the mapping field in the drop-down source. (For more information about the properties of GridDropDownColumn, see Customize/Configure GridDropDownColumn).If you want to filter by ListTextField I would suggest you to check the aprpaoch provided in the help topic below:

    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Filtering/filter-by-listtextfield-for-griddropdowncolumn

    Give this a try and let me know if it works for you.

    Regards,
    Maria Ilieva
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top