0

コンボ ボックスで複数列を実行しようとしていて、2 番目の列を正当化したかったのですが、

しかし、次のコードを実行した後、コンボボックスに表示される項目は次のように置き換えられました: System.Data.DataRowView

string sql = "SELECT customer.customer, arcustmst.cust_name_1 FROM customer INNER JOIN arcustmst ON customer.customer=arcustmst.cust_code";

        SqlCommand custcom = new SqlCommand(sql, myconnection);

        SqlDataAdapter da = new SqlDataAdapter(custcom);
        DataSet1 ds = new DataSet1();
        da.Fill(ds, "customerFrom");

        cboFrom.DisplayMember = "customer.customer" + string.Format({0,-5}, "arcustmst.cust_name_1");
        cboFrom.ValueMember = "customer.customer" + string.Format({0,-5}, "arcustmst.cust_name_1");
        cboFrom.DataSource = ds.Tables["customerFrom"];

結果:

ここに画像の説明を入力 誰でも助けて指導してください。

前もって感謝します

4

0 に答える 0