Filterbar on a column with CellType = Combobox
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
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
SIGN IN To post a reply.
7 Replies
JJ
Jisha Joy
Syncfusion Team
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
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
AM
Alomgir Miah
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
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
AM
Alomgir Miah
July 8, 2009 06:25 PM UTC
Any Update...
LS
Lingaraj S
Syncfusion Team
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.
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.
SG
Sergii Golik
December 22, 2014 11:55 AM UTC
Hi,
Could you advise any decision if we use GridExcelFilter for columns filtering ?
MK
Muthukumar Kalyanasundaram
Syncfusion Team
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
SG
Sergii Golik
December 23, 2014 12:38 PM UTC
Yes, we use same code but Column Filter display ValueMember's instead DisplayMember's. This is senselessly for columns with CellType=GridCellTypeName.ComboBox
For filter bar we found GridDataBoundGridFilterBarExt but we are trying to find something for GridExcelFilter too
SIGN IN To post a reply.
- 7 Replies
- 5 Participants
-
AM Alomgir Miah
- Jun 29, 2009 10:49 PM UTC
- Dec 23, 2014 12:38 PM UTC