MultiSelectComboBox filter row editor wrong items order

Hi,
I have in my grid GridMultiColumnDropDownList column with MultiSelectComboBox filter row editor. But in the filter row editor there is wrong items order, I need A-Z order. It seems that the order is based on ValueMember not on DisplayMember, what would make more sense.

Please check attached sample project and screenshot.

Thanks!

Attachment: data_81d6a564.zip

3 Replies

SS Susmitha Sundar Syncfusion Team May 22, 2020 03:32 PM UTC

 
Thank you for using Syncfusion controls. 
 
In ComboBox controls items are generated by added orders only. In FilterRow, we have used the ComboBoxAdv control. So, it shows the orders based on manner, which you added in its itemsSource. 
 
Now, we have ordered this by apply the sorting for comboBoxItems. We have achieved this by overriding the GridFilterRowMultiSelectRenderer. 
 
Grid.FilterRowCellRenderers.Remove("MultiSelectComboBox"); 
Grid.FilterRowCellRenderers.Add("MultiSelectComboBox", new GridMultiSelectComboBoxRendererExt()); 
 
public class GridMultiSelectComboBoxRendererExt : GridFilterRowMultiSelectRenderer 
{ 
 
    public GridMultiSelectComboBoxRendererExt() : base() 
    { 
    } 
 
    public override void OnInitializeEditElement(DataColumnBase dataColumn, ComboBoxAdv uiElement, object dataContext) 
    { 
        base.OnInitializeEditElement(dataColumn, uiElement, dataContext); 
        SortDescription sd = new SortDescription("DisplayText", ListSortDirection.Ascending); 
        uiElement.Items.SortDescriptions.Add(sd); 
    } 
} 
 
 
 
 
Please check the sample and let us know if you need further assistance on this. 
 
Regards, 
Susmitha S 



OS Ondrej Svoboda May 25, 2020 11:15 AM UTC

Works fine, thanks.


SS Susmitha Sundar Syncfusion Team May 26, 2020 04:15 AM UTC

Hi Ondrej Svoboda, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Susmitha S 


Loader.
Up arrow icon