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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filterbar on a column with CellType = Combobox

Thread ID:

Created:

Updated:

Platform:

Replies:

84216 Jun 29,2009 10:49 PM UTC Dec 23,2014 12:38 PM UTC WinForms 7
loading
Tags: GridControl
Alomgir Miah
Asked On June 29, 2009 10:49 PM UTC

Hi,

I am using GridGroupingControl with one of the column having CellType = "ComboBox". The cells display the data correctly. The issue is that the filterbar dropdown displays raw values. How can I display names instead of raw Id's(using something like displaymember).

Thanks,
Alomgir

Jisha Joy [Syncfusion]
Replied On July 1, 2009 06:37 AM UTC

Hi Alomgir,

I am not able to understand your requirement clearly. I have prepared a sample that allows filtering on combobox columns and it is available in the following location.

http://files.syncfusion.com/support/Grid.Windows/F84216.zip


Please have a look at the sample and let me know more details about your requirements if this does not help you out.

Regards,
Jisha

Alomgir Miah
Replied On July 1, 2009 02:37 PM UTC

Hi,

I ran the sample and see the same issue. Sorry for not being clear enough. Let me rephrase it. Suppose a sql query returns some data using the query

select a,b,c,d,CustomerId from mytable

I want to display Customer Name instead of customerId. So I query Customer table
select CustomerId, Name from myCustomer
and set the following

....AnyRecordFieldCell.DataSource = dataTableCustomer;
....AnyRecordFieldCell.DisplayMember = "Name"
....AnyRecordFieldCell.ValueMember = "CustomerId"

The question is, how do I display "Name" instead of CustomerId in the filterbar ( which show CustomerId by default). The user won't understand the CustomerId.

Thanks,
Alomgir

Alomgir Miah
Replied On July 8, 2009 06:25 PM UTC

Any Update...

Lingaraj S [Syncfusion]
Replied On July 9, 2009 12:28 PM UTC

Hi Alomgir,

Thank you for the update.

If you want filter drop down list as a display member, then please try using GroupingGridFilterBarExt helper class to achieve this behavior. This filter shows the filter drop down list as a DisplayMember.

Please refer the sample in our product shipped along with the below location:
Grid.Grouping Sample -> Filters and Expressions -> Filter By DisplayMember Demo

Please let me know if you have any queries.

Regards,
Lingaraj S.

Muthukumar Kalyanasundaram [Syncfusion]
Replied On December 23, 2014 02:03 AM UTC

Hi Sergii,

 

Thanks for the update.

 

If you want to set the Excel filter in a grid, you can use the GridExcelFilter class and wire the grid. Please refer the below code,

 

Code:

private GridExcelFilter filter;

// form load

filter = new GridExcelFilter();

this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;

for (int i = 0; i < gridGroupingControl1.TableDescriptor.Columns.Count; i++)

{

gridGroupingControl1.TableDescriptor.Columns[i].AllowFilter = true;

}

filter.WireGrid(this.gridGroupingControl1);

 

Please let us know if you have any concern.

 

Regards,

Muthukumar K

 


Attachment: Filter_By_DisplayMember_c0dda465.zip

CONFIRMATION

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.

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

;