Is it possible in DatagridView to forbid editing all lines except the last?

  • @nick_n_a here talk about winforms) - ogorank

1 answer 1

Prevent cell editing:

dataGridView1.Rows[1].Cells[1].ReadOnly=true; 

Prohibit line editing:

 dataGridView1.Rows[1].ReadOnly=true; 
  • If 500 lines? Range can you specify? - Alexander Puzanov
  • To drive into a for loop (int i = 1; i <count; i ++) {...} - ogorank
  • The option is working. It’s easier to open one line for editing than to shovel everything. - Alexander Puzanov
  • one
    The ability to edit is placed at the grid, so to open the opportunity to edit any line, you must open all the lines .. and you have to decide what to change .. If you find another way, be sure to write in the comment - ogorank