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 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据