Here are contacts but we can have multiple contacts so i want to show a list in combobox
DataTable dt = new DataTable();
dt = MainClass.GetDatabyQuery("select * from tbl");
if (dt.Rows.Count > 0)
{
dgv_ClientDetail.DataSource = dt;
}
I have this method to fetch values from database in datagridview but I want one datagridview combobox column and want to bind data in one dgv combobox and other in dgv texboxes. If anybody know then tell me. Here are three columns Name, City , Contacts. I want to show multiple contacts in dgv combobox column
Just select only
Name
andCity
indt
, so that you can do something like,EDIT:
Hope this helps...
Try This:-
First just have data key in DataGridView for the contact. And on ItemDatabound Events just use the datakey for filter for each Dataitem with in that DataGridView.
Try something like this
Edit: You need to set ValueMember for combobox as well