Ho to all. I'm new in vb.net, arriving from MsAccess. I'm getting crazy searching the way to create a combobox multicolumn with column header like the MsAccess combobox. At this point i start to believe that is impossible. Is there here in Stackoverflow comunità someone who reached the solution? Many thanks.
CodePudding user response:
You can use SyncFusion MultiColumn ComboBox for it, Documentation here, it includes small examples and is simple to use.
Code for C# (check documentation for VB)
querry = "SELECT ID, Descricao FROM tab_tasks";
adapter = new OleDbDataAdapter(querry, connection);
adapter.Fill(ds, "idtask");
DataTable dataTable1 = ds.Tables["idtask"];
sfComboBox2.DataSource = dataTable1;
sfComboBox2.DisplayMember = "ID";
This being the base of it, set your data as a datatable and use it as DataSource to your ComboBox. DisplayMember being the Member displayed when you choose one of the values