StrataFrame Forum

How to use DevExpress ComboBoxEdit correctly when adding new records

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

By Kari Paukku - 9/3/2006

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

By StrataFrame Team - 9/5/2006

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.