Browse Dialogue Problem


Author
Message
Wayne Van Rooyen
Wayne Van Rooyen
StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)StrataFrame Beginner (19 reputation)
Group: Forum Members
Posts: 15, Visits: 33
When setting up a browse dialogue and a record is returned, select the record and click okay. This takes you to the maintenance window with the selected record active. However if you now movenext etc on the one pk field update the rest of the test boxes stay as is. Did i do something wrong or is this a bug.
Replies
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

I having a similar problem; getting an InvalidCastException using version 1.41. I have a standard SF maint. form. On the form I have two controls, a textbox and combo box. The combo box is populated by an enumeration and is bound to the BO. The text box is bound to a string property on the BO. If I open the maintenance form and click on “New” I can add a new record with no error. However if I click on browse, retrieve some records and then click “New” I get the InvalidCastException. If I unbind the combo box from the BO everything works fine.

-Larry

 

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
You get the InvalidCastException when the combo box is populated using an enumeration and the bound field property on the business object is not typed as the same enumeration. 

When you use an enumeration to populate a combobox, the SelectedValue (which is what the combobox will bind to by default) actually contains enumeration values, not integer values.  So, to bind to that combobox, you'll need to go to the BOMapper and customize the field to return the enumeration value rather than an integer. 

If you don't want to customize the field, you'll have to populate the combo manually, or it will continue to throw the InvalidCastException Sad

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Wayne Van Rooyen - 19 Years Ago
StrataFrame Team - 19 Years Ago
Wayne Van Rooyen - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
             No problem.
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search