我有这个组合框
BindingSource srd = new BindingSource();
srd.DataSource = llenar.Tables["cnae"];
CmbCnaePrin.DataSource = srd;
CmbCnaePrin.DisplayMember = "cnae_descricao";
CmbCnaePrin.ValueMember = "cnae_id";
我想加载这个
int cnaepr;
DataTable dt3 = new DataTable();
dt3 = ifd.cnaeclas(cnaepr);
txtCnaeC.Text = dt3.Rows[0][2].ToString();
txtCnaeSC.Text = dt3.Rows[0][3].ToString();
但我无法转换
cnaepr=Convert.ToInt32(CmbCnaePrin.SelectedValue)
返回此错误无法将“System.Data.DataRowView”类型的对象转换为“System.IConvertible”类型。