StrataFrame Forum

SF ComboBox - Clearing Value

http://forum.strataframe.net/Topic10347.aspx

By Tim Dol - 7/17/2007

This may be a stupid question but I'm testing something and can't seem to make it work the way I want.

I have a form with SF combobox (DropDown)  bound to a BO. I am populating via business object.  Everything works fine except I want to be able to clear out the combobox value so a empty string is written to the bound field.

I can clear the value from the combo box but it doesn't seem to effect the business object. The original value still remains after I save. I typically don't use comboboxes for these types of things so I haven't run across this before.  I'm sure there is a easy way to make this work...

Any suggestions would be appreciated.

Thanks,

Tim

By StrataFrame Team - 7/17/2007

By default, the BindingProperty of a ComboBox is "SelectedValue" which will not change when you change the text... so when we bing to a ComboBox that is a DropDown instead of a DropDownList, we change the BindingProperty to "Text" and bind to the raw text that is typed into the ComboBox.  Try changing that and see if it gives you the desired effect.
By Tim Dol - 7/18/2007

Thanks that worked.Smile

Tim

By StrataFrame Team - 7/18/2007

Yay Smile