当前位置:编程学习 > VB >>

C1FlexGrid 中如何设某个单元格为只读,谢谢!

C1FlexGrid 中如何设某个单元格为只读,分不多,谢谢! 这个grid没用过,看看有没有beforeedit的事件? 有没有人知道啊,多谢了! 你双击那个控件,在代码的右上的combobox里,看看有没有beforeedit 找到那个beforeedit有什么用呢,和单元格只读有什么关系吗,谢谢! grid有不同,但基本功能差不多。
你把你的grid改成editable。
然后再beforeedit的事件里判断。
例子
if col = 1 then ‘第一例不能edit
cancel = true
elseif row = 3 then ’第3行不能edit
cancel = true
elseif col = 4 and row = 5 then ‘这个单元不能edit
cancel = true
endif
清楚了吗?
补充:VB ,  控件
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,