We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ComboBox with Filter

I have a databounddatagrid with a gridfilter bar. One of the columns has gridboundcolumn combo associated with it. the original column is an integer (fk) and the combo has a dataset that has the id and the name to be shown. So a user can use the combo''s drop down to reassign the value in the column. This all works great, except for the filtering. The filter row shows a list of the underlying id values from the original datatable rather than the string names. As someone mentioned in another post, I handled the CurrentCellShowingDropDown event to remap the filter''s drop down data. This seems to work, but the problem is that it then sets the filter value to the string name and the filter tries to use this to compare with the int value of the original datatable, showing an error and of course not filtering. Thanks for any help you can provide, -ty

2 Replies

AD Administrator Syncfusion Team September 30, 2004 03:09 PM UTC

You can derive the GridFilterBar and override the WireGrid and GetFilterFromRow to achieve this. Here is a sample.


TK Tyler Kohn October 1, 2004 10:00 AM UTC

Thanks, it worked great! I only needed to modify the GetFilterFromRow method to handle multiple filters at the same time. It''s a bit of string searching and cell lookups - it''d be nice if there was a method that was called for each column that could be overridden instead of just the global method that''s available.

Loader.
Live Chat Icon For mobile
Up arrow icon