filtering by display text in column of type combobox
hi,
I have a column displaying combobox in GridGroupingControl, where data source for combo is simple lookup list having id (of type int) and name (of type string) fields.
This column is configured in this way:
gridColumnDescriptor4.Appearance.AnyRecordFieldCell.CellType = "ComboBox";
gridColumnDescriptor4.Appearance.AnyRecordFieldCell.CellValueType = typeof(int);
gridColumnDescriptor4.SortByDisplayMember = true;
to fill combo data, I'm assigning my lookup list in this way (for example):
gridColumnDescriptor4.Appearance.AnyRecordFieldCell.ValueMember = nameof(Role.Id);
gridColumnDescriptor4.Appearance.AnyRecordFieldCell.DisplayMember = nameof(Role.Name);
gridColumnDescriptor4.Appearance.AnyRecordFieldCell.DataSource = new List<Role>(){new Role(){ Id = 1, Name = "a" }, new Role() { Id = 2, Name = "b"}};
at this moment editing, sorting by display member and grouping in this column works very well.
...but the problem is with filtering when I'm trying to add dynamic or excel-like filter to my column.
the question is, how should I configure the column to make filtering by display member (and also sorting by display member and grouping) work ?
when I'm applying dynamic filter in this way:
grdPersons.TableDescriptor.Columns["RoleId"].AllowFilter = true;
grdPersons.TableDescriptor.Columns["RoleId"].Appearance.FilterBarCell.CellType = "DynamicFilterCell";
grdPersons.TableDescriptor.Columns["RoleId"].FilterRowOptions.FilterMode = FilterMode.DisplayText;
var filter = new GridDynamicFilter() { AllowIndividualColumnWiring = true };
filter.WireGrid(grdPersons);
then I can do filtering by display member but sorting and grouping stops work and in the filter lookup list there are displaying id values instead of names.
In the case of excel-like filter it's bit better because I'm able to filter by display member using auto and custom filters but still (like in dynamic filter) sorting and grouping doesn't work.
excel-like filter is configured as follows:
grdPersons.TableDescriptor.Columns["RoleId"].AllowFilter = true;
grdPersons.TableDescriptor.Columns["RoleId"].Appearance.ColumnHeaderCell.CellType = "GridExcelFilterCell";
grdPersons.TableDescriptor.Columns["RoleId"].FilterRowOptions.FilterMode = FilterMode.DisplayText;
GridExcelFilter.EnableFilteredColumnIcon = true;
var filter = new GridExcelFilter() { AllowIndividualColumnWiring = true, AllowResize = true, ColumnFilter = GridExcelFilter.GridFilterMode.DisplayText, EnableDateFilter = true, EnableNumberFilter = false };
filter.WireGrid(grdPersons);
please, help,
best regards,
Adam
SIGN IN To post a reply.
4 Replies
AR
Arulpriya Ramalingam
Syncfusion Team
March 15, 2018 03:47 PM UTC
Hi Amsm,
Thanks for contacting Syncfusion support.
We confirmed that the reported scenario is a defect and we have logged a defect report. The fix for this issue will be included in our upcoming main release 2018_Volume_2 which will be available in end of May 2018.
Regards,
Arulpriya
AM
amsm
March 17, 2018 02:28 PM UTC
thank You
AR
Arulpriya Ramalingam
Syncfusion Team
March 19, 2018 04:07 AM UTC
Hi Adam,
Thanks for the update.
Please let us know, whether you need any further assistance on this.
Regards,
Arulpriya
SN
Sindhu Nagarajan
Syncfusion Team
June 26, 2018 08:46 AM UTC
Hi Adam,
The reported issue “Records are not sorted and grouped when SortByDisplayMember and FilterMode as DisplayText is enabled” has been included in our Essential Studio 2018 Volume 2 Release v16.2.0.41 which is rolled out successfully and is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Sindhu
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
AM amsm
- Mar 12, 2018 10:45 AM UTC
- Jun 26, 2018 08:46 AM UTC