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

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -