T
trint
I want to bind just the first column from a sql query to a list box so
that it only contains the first column results. Like:
listBox1_______
101
201
301
401____________
I already have the data bound (but it's the whole row) to a
datagridview:
DataTable table0 = new DataTable();
table0.Locale =
System.Globalization.CultureInfo.InvariantCulture;
dataAdapter0.Fill(table0);
bindingSource8.DataSource = table0;
dataGridView8.DataSource = bindingSource8;
Can I use that somehow to get my first column? e.g.
(listBox2.DataSource = table0["id"].DefaultView;
I know the above on the listbox doesn't work, but something like that?
Any help is appreciated.
Thanks,
Trint
that it only contains the first column results. Like:
listBox1_______
101
201
301
401____________
I already have the data bound (but it's the whole row) to a
datagridview:
DataTable table0 = new DataTable();
table0.Locale =
System.Globalization.CultureInfo.InvariantCulture;
dataAdapter0.Fill(table0);
bindingSource8.DataSource = table0;
dataGridView8.DataSource = bindingSource8;
Can I use that somehow to get my first column? e.g.
(listBox2.DataSource = table0["id"].DefaultView;
I know the above on the listbox doesn't work, but something like that?
Any help is appreciated.
Thanks,
Trint