1

可能重复:
具有多列的 WinForms 组合框(C#)?

我这个程序 ALTER proc [dbo].[VCNAE] as select cnae_id,cnae_descricao, cnae_classe from tbl_CNAE order by cnae_descricao

我用于填充此数据集

        SqlCommand llena4 = new SqlCommand("vcnae", abre);
        llena4.CommandType = CommandType.StoredProcedure;
        da2.SelectCommand = llena4;
        da2.Fill(carga1, "cnae");//4

然后我填充组合框

         BindingSource srd = new BindingSource();
         srd.DataSource = llenar.Tables["cnae"];
         CmbCnaePrin.DataSource = srd;
         CmbCnaePrin.DisplayMember = "cnae_descricao" ;
         CmbCnaePrin.ValueMember = "cnae_id";
         CmbCnaePrin.SelectedValue = 259;

我想在显示成员中显示:

cnae_descricao, cnae_classe

                     displaymember = "cnae_descricao"+"cnae_classe"; but this code not work how can  i solve this::????

谢谢

4

0 回答 0