Friday, September 30, 2011

ASPxComboBox: Add button to clear selection

The Devexpress ASPxComboBox contains a Buttons collection to which you can add a number of buttons. By default the button will contain ellipsis (...) as Text but you can change this by using the Text property. You can also add an image like in the code below. In order to remove the selection you will need to add the clientsideevent button click and check for the buttonindex. If the buttonindex is 0 (the button will create will be the first on displayed), then set the selectedindex to -1, thus removing selection.


No comments:

Post a Comment