c# - DataGridViewComboBox value is not valid linq -
im filling datagridview comboxcolumn code:
(dgvhopdong.columns["mancc"] datagridviewcomboboxcolumn).datasource = ql.nhacungcaps.select(n => new { mancc = n.mancc, tenncc = n.tenncc }).tolist(); (dgvhopdong.columns["mancc"] datagridviewcomboboxcolumn).displaymember = "tenncc"; (dgvhopdong.columns["mancc"] datagridviewcomboboxcolumn).valuemember = "mancc";
and error is:
datagridviewcomboboxcell value not valid?
and dont know why. thank much!
the value type missing.
(dgvhopdong.columns["mancc"] datagridviewcomboboxcolumn).valuetype = typeof(string);
Comments
Post a Comment