c# datagridview differentiate user input from program -


i have c# winform datagridview.

the program should able change cells values in datagridview, user should not allowed to.

i.e.: how can differentiate whether user or program editing cell in datagridview?

so far found readonly property (e.g. of column). program not able edit column either.

i leave column readonly=true , when program wants change cell value, make readonly=false, change value, readonly=true...but solution seems bad me, if column needs constant update program (e.g. financial price data stream), don't want user change price (even though overwritten program, might or might not happen soon).

thanks, imran

you mean this?

datagridview1.editmode = datagridvieweditmode.editprogrammatically; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -