How to use DevExpress ComboBoxEdit correctly when adding new records


Author
Message
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

I have a simple table with three columns. All fields are type of Oracle VARCHAR2.
The controls on the screen are Devexpress controls: one TextEdit and two ComboBoxEdit that get populated using BusinessObjects.


The select,update and delete works fine. When adding a new record the business object is entered into the BO (the TextEdit filed becomes empty). The ComboBoxEdit fields show the first item in the lists.

After entering data to all the fields (to TextEdit by entering text and into ComboBoxEdit by selecting from the list) and pressing "Save", SF returns error:

BusinessLayerException
 An error occurred while saving an the data to the server.
DataLayerSavingException
 Object reference not set to an instance of an object.
NullReferenceException
 Object reference not set to an instance of an object.

The debug info doesn't show a INSERT-statement so the error happens before the actual insert into the database happens.

My guess is that the ComboBoxEdit doesn't get populated or something. Can you figure out what happens here and how should it be handled/programmed correctly?

Thanks,
Kari

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 can check the BusinessObject.CurrentDataTable within the Watch window (using the debugger visualizer by clicking the little magnifying glass in the value cell) and determine whether the new record within the business object has values for both of the ComboBoxEdit columns.  If they do have the proper values, then it might be that the OracleDataSourceItem you have does not have the latest changes (the bug fixes that I made). 

You should be able to download a proper build from http://www.strataframe.net/downloads/strataframe.exe that has the proper changes.  The only caveat to using this version is that you need to delete your StrataFrameSample database before running the install.

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