Question How to populate dropdownlist in DataGridView

thakur_amit

New member
Joined
Mar 12, 2010
Messages
1
Programming Experience
Beginner
Hi,

I want to populate drop down list inside DataGridView.
Consider this...

I have give DataGridView to enter details...
1) Name
2) RollNo
3) City

For Name and RollNo user will enter details, but for city i want user to select city from dropdownlist.

Please guide me some suitable link or example to achieve this...

Thanks
Amit
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,583
Location
Norway
Programming Experience
10+
Add a Combobox column to your DataGridView, add the item options:
VB.NET:
Me.ComboColumn.Items.Add("option A")
Me.ComboColumn.Items.Add("option B")
You can also bind the columns DataSource/DisplayMember/ValueMember to a DataTable.
 
Top Bottom