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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBox with Filter

Thread ID:





19634 Sep 30,2004 01:24 PM UTC Oct 1,2004 10:00 AM UTC WinForms 2
Tags: GridControl
Tyler Kohn
Asked On September 30, 2004 01:24 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Tyler Kohn
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon