关于数据网格视图 [英] about data grid view

查看:81
本文介绍了关于数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使只读datagridview成为一列....我尝试这段代码
dataGridView1.Rows [j] .Cells [0] .ReadOnly = true;
但它不起作用.

how to make read only datagridview one column.... i try this code
dataGridView1.Rows[j].Cells[0].ReadOnly = true;
but it''s not working.

推荐答案

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.readonly.aspx [ ^ ]
To make any column readonly in Datagrid[^]

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.readonly.aspx[^]


我只希望将一列设置为只读列,而不是所有datagridview.
I want to make only one column readonly... not all datagridview.


使用数据库的数据集属性使其为只读,并通过数据集索引传递您的(已写入)代码
use dataset property of database to make it read only and pass your(above written) code with index of dataset


这篇关于关于数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆