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
  • 469350
    Verified Answer
    Offline posted

    Hi,

    If the Combo is bound, then the only way to get a "null" item onto the list would be to add one to the data source. 

    What about using an EditorButton? You could add a button the ButtonsRight or ButtonsLeft collection and then when the button is clicked, set the Value of the control to Null or DBNull.Value.

    Oh... another idea would be to use the Del key. You could handle KeyUp and when the user presses Del or BackSpace you could set the control's Value to null. 

Children