zoukankan      html  css  js  c++  java
  • unidbgrid单元格操作

    unidbgrid单元格操作

    //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);}
    }

    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;
    原文:https://www.cnblogs.com/wxb-km/p/5710146.html
  • 相关阅读:
    vmware中三种网络连接方式
    【史上最全面经】各岗位汇总目录
    史上最全2019届秋招备战攻略
    程序员常用软件
    经典大数据面试题
    春招实习终于结束啦
    Java程序员自我介绍
    java一些面试题
    收割大厂offer需要具备的条件
    triangular distribution
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/8917618.html
Copyright © 2011-2022 走看看