Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
735
UltraComboEditor + Nullable + DropDownList
posted

Hi,

I, like many others on this forum, have came to realize the lack of functionality in the UltraComboEditor for providing a means of selecing a Null (Value = null) when using a bounded control with the DropDownStyle set to DropDownList. I guess a simple solution would be to have the control automatically add a dummy item to the list that sets the Value property to null when the control is Nullable and DropDownList style is selected. The null item would appear as the first item in the list, would get its Text value from the NullText property that is already present and would not be included in the Items count or when retrieving the bounds item from the DataSource property.

I have submitted a feature request already and before trying to create some solution I and was wondering if anyone here has already created some kind of solution that myself and others could benefit from. 

Thanks

Parents
No Data
Reply
  • 1125
    posted

    One other option is to use the UltraCombo instead.  It has an AllowNull property that works as you'd hope in conjunction with limittolist, i.e. it restricts you to just the items in the list but the value can still be nulled.  SuggestAppend works nicely and generally it all works well.  

    You can write a bit of code to format the list to only show one column in the drop down list and to remove column headings etc if so desired and then just stick that code in a static helper class somewhere and pass the layout of the combo to it in the initializeLayout event of the combo.

    HTH

Children
No Data