This is a migrated thread and some comments may be shown as answers.

Filtering with dropdown column not working

1 Answer 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
LJZIMMERMAN
Top achievements
Rank 1
LJZIMMERMAN asked on 29 Sep 2016, 06:18 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 04 Oct 2016, 01:20 PM
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.
Tags
Grid
Asked by
LJZIMMERMAN
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or