c# - How to check to which DataColumn a DataGridTextColumn is bound to -


i check datacolumn datagridtextcolumn bound to.

i trying like:

private void kblmeoravprdatagrid_preparingcellforedit(object sender, datagridpreparingcellforediteventargs e) {      if ((e.column datagridtextcolumn).binding.path == "dbfieldname")      { 

you should first check value isn't null.

var datagridtextcolumn = e.column datagridtextcolumn; if (datagridtextcolumn != null) // if not null column datagridtextcolumn {    //working } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -