I have an UltraComboEditor, The source Table contains 4 columns.
Code(string), Description(String), Filer(string), createdDate(DateTime)
UltraComboEditor's valuemember is code and Displaymember is Description.
I would like to display only Description by sorting CreatedDate by descending.
when I try with below code:
combo.DisplayLayout.Bands[0].Columns["CreatedDate"].SortIndicator = SortIndicator.Descending;
its not displaying description as sorted by created date.
Could you let me know how to achieve this?
UltraComboEditor doesn't have a DisplayLayout or any columns, so I assume you are using UltraCombo.
I tried this out and setting the SortIndicator on the column works fine for me. I expect that something else in your application is causing the sorting to be removed after you set it. Maybe your code is re-setting it or sorting on some other column later on. Or maybe you are calling combo.DisplayLayout.Load and loading a layout which is blowing away the setting. I have attached me sample project here so you can see verify that it works for you in a simple sample.
WindowsFormsApp60.zip
I am not creating columns in UltraComboEditor. The datasource of the UltraComboEditor is a table.
Which contains below columns.
Code(string), Description(String), Filer(string), createdDate(DateTime).
combo is my UltraComboEditor
combo.ValueMember = "Code"; combo.DisplayMember = "Description";
the above is not giving me any error. it executes. but in the end the dropdown is not sorted based on CreatedDate
Hello Pruthvi,
Thank you for contacting Infragistics Developer Support!
What columns are you creating in the UltraComboEditor? Are you getting any errors when you try and sort in code?