views:

263

answers:

1

I have a noob question. I have a WinForm (.net 2.0 in VS 2008) on my from I have a DataGrid One of the fields in that datagrid is a combo box that is bound to a separate table. this works, but I am unable to edit or add, I cannot add a value that is not on the list.

I am looking to create a lookup box for lack of a better term.

The form is for Parts Order Entry In the data Grid Data Source is PartsOrder_table, the Work order Field is a int in the PartsOrder_table, and the combo box is bound to the WorkOrder_table. The WorkOPRder_Table has WorkOrd_ID int and WrkOrd nvarchar(10)

the Combo Box Data Source is WorkOrd_Table Display Member is WorkOrd Value Member is WorkOrder_ID

This works great with the problem that I cannot add or select anything not in WorkOrder_table.

Any Help would be greatly appreciated.

Thanks

A: 

Seems you cannot in a straight forward manner. This thread shows a way of doing this, by adding the needed values during the Validation of the ComboBox control. See the URL for more details.

http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/31a28e99-6f9f-4cce-b256-9b7cf1ddf69a/

Thies