Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Sorting CExtGridCellDropListComboBox Collapse All
Subject Author Date
Paul Cowan Mar 7, 2007 - 9:23 AM

How do I get CExtGridCellDropListComboBox to sort the strings?

Suhai Gyorgy Mar 8, 2007 - 2:43 AM

I think easiest way would be to just insert the strings sorted when the list is initialized.

If that’s not applicable in your case, the other solution would be to override every method that increases the number of items or changes text of any of them. These methods are (sorry if I miss any): AddItem, AddString, InsertItem, InsertString, SetItem, SetItemString. These methods should handle the proper ordering of the items, as well. Check original implementation of methods in CExtGridCellComboBox.

Actually there’s a method OnPopupListBoxInitContent, you could override that to have the items in the popup list shown in proper order, but by overriding just this method the control wouldn’t work properly when pressing up-down arrow to have the previous-next item selected, as the item-array inside the control wouldn’t be in proper order.