StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



SF ComboBox - Clearing ValueExpand / Collapse
Author
Message
Posted 07/17/2007 10:16:32 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 3:01:42 PM
Posts: 309, Visits: 1,246
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

Post #10347
Posted 07/17/2007 1:32:20 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
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.


www.bungie.net
Post #10372
Posted 07/18/2007 7:00:14 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 3:01:42 PM
Posts: 309, Visits: 1,246
Thanks that worked.

Tim

Post #10398
Posted 07/18/2007 8:43:52 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
Yay


www.bungie.net
Post #10404
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 6:05am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.