日期:2014-05-18  浏览次数:21040 次

vs2005,WinForm中如何获取DataGrid中某行某列的控件,并设置控件属性?
我现在在处理一个绑定数据的DataGrid,因为某些需要,需要得到DataGrid的中某行某列的控件,并设置控件属性。如:readonly=true,而该列的其他行的属性不变。

查了好多资料都无法处理,不知道是否是ms的DataGrid不支持这种处理呢?

谢谢!

------解决方案--------------------
用gridView不行吗?
------解决方案--------------------
document.getElementById(“id”);
------解决方案--------------------
关注一下,我一直没弄明白这个问题!
------解决方案--------------------
WinForm中的datagrid不知道一webform中使用的属性差不多?

在webform中我倒知道怎么使用
------解决方案--------------------
(controlClass)this.gridID.items[index].controls[index]
------解决方案--------------------
还有一种(controlClass)this.gridID.items[index].cells.controls[index]

controls也可以换成findcontrol,但要知道childcontrol id
------解决方案--------------------
幫頂