|
-
Feb 6th, 2010, 06:19 AM
#1
Thread Starter
Hyperactive Member
Using Combobox in DataGridView
I have a DataGridView that is bound to a SQL-Server database, and it works fine. One column, however, contains the key value for a record in another table... entering "1" doesn't mean very much, you know? So I want to add a ComboBox to the DataGrid that lets the user choose the Name while the grid saves the key value.
For example, let's say I'm building a list of students in a class... I have two tables: The first table contains a list of students, and the second places those students in a particular class. Instead of storing the student information directly in the second table, I want to store the student ID... but I want the combo box to DISPLAY the student's name.
Does anybody know how to do this, or can point me to a good source online that will show me how?
Thanks.
Last edited by HongKongCV; Feb 6th, 2010 at 11:19 AM.
Reason: Added details
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|