StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Adding a Combo Box to a Data GridExpand / Collapse
Author
Message
Posted 07/16/2006 11:58:05 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/31/2006 12:29:54 PM
Posts: 3, Visits: 11
Is it possible to add a combo box to a data grid view?  I want the combo box to display a description from a lookup table and store the item's code in the primary table.  I've added Business Binding Sources for each table, but I'm not able to configure the drop down box to display values from the lookup source, but assign the resulting code to the primary table.  If this is not possible with the delivered data grid view, can it be done with the DevExpress data grid?

Thanks for your help.

Lee

Post #1859
Posted 07/16/2006 2:20:24 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/31/2006 12:29:54 PM
Posts: 3, Visits: 11
I removed the Business Binding Source for the lookup and added it back and now the field mappings work.  When I display the grid in view only mode, it appears to be working - the data from the lookup table appears.  My problem now is I'm getting an error when the grid is enabled for editing and the combobox drop down style is on and I'm inserting a row.  The error is:

DataGridView Default Error Dialog:  System.Argument.Exception: DataGridViewComboBoxCell value is not valid.  It seems like it's rejecting the empty value before I have a changed to edit.

Thanks for your help.

Lee

Post #1860
Posted 07/16/2006 5:50:20 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
Can you post a sample of your code... the two business objects and the form with the grid would be fine.  If you don't want to post them here, you can ZIP and email them to me.  That way I can step through it and see what the problem might be.


www.bungie.net
Post #1861
Posted 07/18/2006 7:53:33 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/31/2006 12:29:54 PM
Posts: 3, Visits: 11
Hi,

I've attached the form and the two BO files. 

Thanks for looking at this.  If you need more info, please let me know.

Thanks,

Lee

  Post Attachments 
UnreadBooks.zip (23 views, 13.29 KB)

Post #1879
Posted 07/25/2006 10:22:30 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/01/2008 8:53:41 AM
Posts: 2,671, Visits: 1,879
I haven't forgotten you, lmarrette, and I've found the problem... just trying to fix it right now


www.bungie.net
Post #1936
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:11pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 12 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.