zoukankan      html  css  js  c++  java
  • UNIDBgrid里动态添加clientevents实现回车替换TAB

    //GRID里回车替换TAB
    function cellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
    {
    if (e.getKey()==13){var a=sender.editingPlugin;a.startEdit(record.index,cellIndex+1);}
    }

    动态添加clientevents,实现按回车向右移动:

     if unidbgrid1.ClientEvents.ExtEvents.Values['cellkeydown']='' then
      begin
         ClientEvents.ExtEvents.Values['cellkeydown']:='function cellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)'
         +'{'#13#10
         +'if (e.getKey()==13){var a=sender.editingPlugin;a.startEdit(record.index,cellIndex+1);}'#13#10
         +'}'#13#10;
      end;

    实现按回车向下移动:

     if unidbgrid1.ClientEvents.ExtEvents.Values['cellkeydown']='' then
      begin
         ClientEvents.ExtEvents.Values['cellkeydown']:='function cellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)'
         +'{'#13#10
         +'if (e.getKey()==13){var a=sender.editingPlugin;a.startEdit(record.index+1,cellIndex);}'#13#10
         +'}'#13#10;
      end;
  • 相关阅读:
    行规
    不要在对抽象类接口abstract virtual什么的混淆不清了
    MQ与Webservice的区别
    Asp.net MVC流程简述
    Lambda表达式树
    mysql用户管理、权限管理
    mysql锁、事务、存储引擎、索引
    mysql新增、删除、修改
    mysql基础
    linux的任务计划与mail
  • 原文地址:https://www.cnblogs.com/wxb-km/p/5710146.html
Copyright © 2011-2022 走看看