DataGridView read only cells

前端 未结 9 462
余生分开走
余生分开走 2020-12-09 10:57

I have a binded DataGridView that contains a large amount of data. The problem is that some cells has to be ReadOnly and also when the user navigates with TAB or ENTER betwe

9条回答
  •  Happy的楠姐
    2020-12-09 11:37

    There's a very nice sample here:
    http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx

    You just need to override Paint() , I've used this on compact framework to change the backcolor depending on the cell contents so on the same note you shouldn't have any problem to set them read only.

提交回复
热议问题