每次我的表单加载/打开时,它都会提示“System.Data.DataRowView”,我怎样才能删除它?
这是我的代码:
{
InitializeComponent();
GetProcessorCardTypes();
}
private void GetProcessorCardTypes()
{
cn.Open();
MySqlCommand cmd = new MySqlCommand("call GetProcessorMethod(1)", cn);
MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);
DataTable dt = new DataTable();
adapter.Fill(dt);
cmbProcessorMethods.DataSource = dt;
cmbProcessorMethods.ValueMember = "method_id";
cmbProcessorMethods.DisplayMember = "method_name";
}
private void cmbProcessorMethods_SelectedIndexChanged(object sender, EventArgs e)
{
MessageBox.Show(cmbProcessorMethods.SelectedValue.ToString());
}