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;
  • 相关阅读:
    HyperLeger Fabric开发(三)——HyperLeger Fabric架构
    WPF设计の画刷(Brush)
    WPF设计の画刷(Brush)
    WPF设计の画刷(Brush)
    Mina Basics 02-基础
    内置方法
    py-opp 类(class)
    Python 学习目录
    py-函数进阶
    py-函数基础
  • 原文地址:https://www.cnblogs.com/wxb-km/p/5710146.html
Copyright © 2011-2022 走看看