ComboBox with a "Not Selected" option


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
How would you recommend implimenting such a combobox.  I am using the SF combobox and populating that combo with a business object.  I have tried adding a row to the business object (Not Selected) and not saving the data and that seems to work but I just can't find the right setting to get the form to NOT prompt to save if there is changes on the combobox's business object.  My form include settings are all set to DeterminedByBusinessObject and this business object is not directly on the form, it is in a custom user control that is being added to the form, no BOTranslation is being done for this BO. Its include settings are all set to false.  When I look at the forms businessobject coolection in the unsavedchagesexist event I notice that that bo is listed and isdirty is set to true.

Any suggestions?

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I would recommend that rather than adding the extra record to the business object you should use the TopMostItem() option on the ComboBox itself... you can specify both value and a display value for the top most item in the list... generally "<Not Selected>" and 0, or something like that.

Also, if you ever add a record to a business object manually, and you don't want that record to make the business object dirty, then you can accept the changes on the row like this:

MyBO.CurrentRow.AcceptChanges(); //-- Make sure you're on the right row...

This way, you add new rows all day log without the business object thinking it's dirty.

Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Thanks for the info.  I really gotta get my boss to send me to the next class.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Smile I know it helped several people.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search