コンボボックスにSELECT
クエリの結果を入力します。コンボボックスにSELECT結果を入力してください
これは、コンボボックス内の行を示しているが、すべてである:System.Data.DataRow
SELECT
の結果は、データテーブルに格納されています。
string ChaineDeSelction = "SELECT fir_mdnt FROM -- WHERE fir_aktiv = 1 AND EXISTS(select firbpv_fir from --)";
OdbcConnection MyConnec = new OdbcConnection(MyConnString);
MyConnec.Open();
OdbcCommand MyComm = new OdbcCommand(ChaineDeSelction, MyConnec);
DataTable.Load(MyComm.ExecuteReader());
_cb_Societe.DataSource = DataTable; <--- I tried this way the the foreach .Add way but both return the same.
foreach(DataRow Ligne in DataTable.Rows)
{
_cb_Societe.Items.Add(Ligne);
}
私も同じ
で満たさDataGridViewの任意の提案がありますか?
使用コンボボックスのDisplayMemberとValueMemberでの特性について学ぶ必要があります。 –