c# - disable third column of data grid view if first two column having data -


I am working on the form of windows ..
I have the data grid view (3 columns). I want if the first data does not have two columns, then disable the third column.
If I have data in the first two columns then the third column should be enabled.

My data grid view like this

 Enter image details here

If there are some data in the first two columns, I will have to enter some ID in the third column. Secondly, I do not want permission to enter an ID in the third column - How can I do this?
Any help is very commendable?

  string cell 1 = datagrid view 1. Ro [0]. [[0]. [0]. Value ToString (); String Cell 2 = Data Grid View 1. RO [0]. Game [1]. Value ToString (); If (string. ISOLORO Whitespace (cell 1) and string. ISO off of WhiteSite (cell 2)) {dataGridView1.Rows [0] .cel [2] .ReadOnly = true; }    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -