cs3939 2009-08-12 11:33
浏览 196
已采纳

ext editorgridpanel 能实现这样的功能吗?

ext editorgridpanel 能实现这样的功能吗?

我先读取了两条记录在editorgridpanel 里,
而这两条记录是不允许修改的,其它可随意添加一行,修改,删除.
唯独这两行不能修改内容,可删除.

这样的功能能实现吗?

希望各位给点方案!

等待中...
[b]问题补充:[/b]
:D 非常感谢 atian25

问题解决了,其实之前也有此思路,因为比较急所以没有去实践.

看来以后有了理论之后要多实践.

以下是我的代码:

.......

listeners : {
beforeedit : function(obj){
if(obj.row==0){
return false;
}
}
}

.......

  • 写回答

1条回答 默认 最新

  • iteye_10013 2009-08-12 11:57
    关注

    监听grid的beforeedit事件,判断record是不是你需要的那2条,如果是,return false就可以把编辑事件取消掉.

    beforeedit : ( Object e )

    Fires before cell editing is triggered. The edit event object has the following properties

    grid - This grid
    record - The record being edited
    field - The field name being edited
    value - The value for the field being edited.
    row - The grid row index
    column - The grid column index
    cancel - Set this to true to cancel the edit or return false from your handler.
    Listeners will be called with the following arguments:
    e : Object
    An edit event (see above for description)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序