C
chris
Hi folks,
I'm getting an error when binding a combo box.. the following works
fine...
comboBox1.DataSource = m_data.Tables[0];
comboBox1.DisplayMember = "Title";
comboBox1.ValueMember = "Key";
.... but I really want the data sorted by "Title" so I tried the
following...
DataRow[] dr = m_dvdData.Tables[0].Select("","Title ASC");
comboBox1.DataSource = dr;
comboBox1.DisplayMember = "Title";
comboBox1.ValueMember = "Key";
.... but when assiging the ValueMember I get an 'Argument Exception'
error and I can't figure out why.
I also tried the select with a valid filter expression but that gave
the same result.
I also tried importing the selected datarows into a new table, but the
gave the same result.
Can anyone shed some light on this?
Cheers,
Chris.
I'm getting an error when binding a combo box.. the following works
fine...
comboBox1.DataSource = m_data.Tables[0];
comboBox1.DisplayMember = "Title";
comboBox1.ValueMember = "Key";
.... but I really want the data sorted by "Title" so I tried the
following...
DataRow[] dr = m_dvdData.Tables[0].Select("","Title ASC");
comboBox1.DataSource = dr;
comboBox1.DisplayMember = "Title";
comboBox1.ValueMember = "Key";
.... but when assiging the ValueMember I get an 'Argument Exception'
error and I can't figure out why.
I also tried the select with a valid filter expression but that gave
the same result.
I also tried importing the selected datarows into a new table, but the
gave the same result.
Can anyone shed some light on this?
Cheers,
Chris.