StrataFrame Forum

Changing a Combotext value

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

By Ger Cannoll - 1/2/2010

I am having a problem with all my Comboboxes.

Say I have a ComboBox, which comes from a BO, and available values are A,B,C,D. If Ichange the selection from say A to B, everything is ok and the B is saved back to the database.

If there was an A in the value and I enter  X into the combobox(i.e. a value that is not in the Dropdown), when the record is saved, the value that is saved is A (Not the X). I noticed this when I was building a validation routine , and if I enter an X, I cant seem to trap this anywhere (I want to add the fact thet an X was entered into the BrokenRules). Its ok that the X is not written away , as it would not be a valid entry anyway, but I am having a problem in that the Business Object still has th 'A' in there insted of the 'X', and I want to let the user know that they have typed in an 'X', otherwsie they will continue on and think that the 'X' has been accepted.

By Les Pinter - 1/3/2010

Dear Gerard,

   I fought this one for a long time, and finally decided to change from a DropDownCombo (List AND TextBox) to a DropDownList (You can't type anything - you can only select from the list), and the problem went away. At first I thought it compromised my design, but I finally decided that it didn't.

Les

By Ger Cannoll - 1/3/2010

Hi Les.

I changed to a DropDownList and that solves the immediate issue..thanks for that. I am sure there will be situations in the future when I may need to also enter text into the Dropdown but will cross that bridge when it happens.

Regards, Gerard