We are using primarily Infragistics.Win.UltraWinEditors.UltraComboEditor for list pickers.
We then set DropDownStyle to DropDownList which is great at avoiding coding and forcing a list choice.
BUT we've realized there will be situations where the user doesn't know what the entry should be or would like to clear an entry.
We can do all that in the ItemNotInList, but requires coding behind all those UCE's.
Is there a better way to require list choice, AND permit no entry OR clear entry ?
Shoud we be using UltraDropDown that permits clearing the control ?
or some other control ?
Thx,
XPXJ
One easy way to do this would be to put a blank item on your list.
Otherwise, you will need to provide a UI for your users to clear the selection. If you are using UltraComboEditor, then you could use the ButtonsRight collection to the add a "Clear" button. But there's no built-in UI to allow the user to clear the list when the DropDownStyle is set to DropDownList.
What's your suggestion if DropDownStyle is set to DropDown ?
What's different about UltraDropDown vs. UltraComboEditor in this regard ?
What's the event behind ButtonsRight collection ?
The UltraDropDown doesn't control this, it's contolled by the grid column. If you want users to pick a value from a list and not be allowed to type into the cell, set the Style property of the Column to DropDownList.
The Ultradropdown has not feature to limit to list (when used in a grid cell). This would be beneficial in the real world. I've checked the 'sample' applications (in 10.2), the 'ultradropdown' sample form (which 3 bands on the grid ), allows any integet valeu to be typed in (will only throw an error if it's not a valid integer). Are any improvements to the DropDown planned - Is it worth me downloading the release for 10.3 ? In the mean time i'll just add the required validation to the appropriate event.
petejordan said:What's your suggestion if DropDownStyle is set to DropDown ?
In this case, there is no problem. The user can type anything or nothing in the list. The control make no attempt to limit the user to the list items unless LimitToList is explicitly set to true.
petejordan said:What's different about UltraDropDown vs. UltraComboEditor in this regard ?
There are two totally different controls, so I'm not sure what kind of comparison you are making here. UltraDropDown is not a standalone control, it works as a ValueList to provide a dropdown list to a grid cell. In a case like this, the grid columns Style is what determines the dropdown style.
petejordan said:What's the event behind ButtonsRight collection ?
It depends on the type of button, but it's something like EditorButtonClick.