DataGridViewComboBoxColumn

Posts   
 
    
anth
User
Posts: 2
Joined: 07-Oct-2006
# Posted on: 07-Oct-2006 04:57:53   

Hi All

I'm using LLBLGen v2 - Selfservicing, when i bind an entitycollection to a datagrid, all works fine. I can use savemulti to update the database (mssqlexpress) no problems.

The scenario is a Job entity, an Inventory entity and a JobInventory entity. The information going into the grid is the JobInventory collection (being inventory items assigned to a job).

When i change the "InventoryID" column on the datagridview from a textbox to combobox column and set the datasource of the combobox to be the inventory collection that is loaded, everything compiles fine. However at runtime, if you go to create a new row in the datagrid and click on the combo box column it comes up with the following error

"System.ArgumentException: DataGridViewComboBoxCell value is not valid. To replace this default dialog please handle the DataError event."

Could it have something to do with the foreign key setup? am I databinding wrong? Can I not bind a collection to the grid and a collection to the combobox?

-Anthony

anth
User
Posts: 2
Joined: 07-Oct-2006
# Posted on: 07-Oct-2006 05:47:10   

doesnt matter folks, i changed the field to be a .net 2 nullable type in llblgen and it is fine now.

thanks

btw - love the product

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 07-Oct-2006 11:13:15   

smile

Glad it's solved! simple_smile

Frans Bouma | Lead developer LLBLGen Pro