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

FYI: More simple way to filter GridDropDownColumn

0 Answers 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 2
Dave asked on 12 Oct 2017, 09:36 PM

So, I was implementing this:

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

But then as I was implementing it, I realized that this was overly complicating the issue.

It has you add a hidden gridboundcolumn and then pass the values between the hidden column and the drop down in events and re-fire the filter.

Instead, you can just add the extra gridboundcolumn, but do not hide it - let it be the display column in the grid.  But set readonly=true so it does not display in the edit form.

Then simply set display=false for your griddropdowncolumn.   It will not display in the grid, but will still show in the edit/insert forms.

This removes the need for any event wiring between the two controls.  It simply "works".

It also lets the filter control display the correct types of filters (IE text filters options vs. numeric filter options) without further hacking.

Simpler is better right?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dave
Top achievements
Rank 2
Share this question
or