jQuery MiniUI

 找回密码
 立即注册
查看: 4315|回复: 1
打印 上一主题 下一主题

datagrid的回车键 真是无法生效 [复制链接]

Rank: 3Rank: 3

跳转到指定楼层
楼主
发表于 2016-4-14 21:35:31 |只看该作者 |倒序浏览
  1. var grid = new mini.DataGrid();
  2.                                  var columnList = new Array();
  3.                                 var editor = { type: "Spinner" ,allowLimitValue:false,changeOnMousewheel:false };
  4.                                 columnList.push({ field:"GroupName", width: 120, headerAlign: "center", header: "", editor: { type: "textbox" } ,readOnly:true});
  5.                             columnList.push({ field:"MinBet", width: 120, headerAlign: "center", header: "单注最低", editor: editor });
  6.                             columnList.push({ field:"MaxBet", width: 120, headerAlign: "center", header: "单注最高", editor: editor });
  7.                             columnList.push({ field:"SumMaxBet", width: 120, headerAlign: "center", header: "单项最高", editor: editor });
  8.                                 columnList.push({ field:"TuiShui_A", width: 120, headerAlign: "center", header: "A盘(%)", editor: editor });
  9.                                 columnList.push({ field:"TuiShui_B", width: 120, headerAlign: "center", header: "B盘(%)", editor: editor });
  10.                                 columnList.push({ field:"TuiShui_C", width: 120, headerAlign: "center", header: "C盘(%)", editor: editor });
  11.                                
  12.                                 grid.set({id:"gameGrid_"+gameId,showPager:false, allowCellValid:true, allowCellSelect:true,allowCellEdit:true,columns:columnList});
  13.                                
  14.                                 grid.on("cellendedit",inputValueEv);
  15.                                 grid.on("cellvalidation",validaEv);
  16.                                 grid.on("celleditenter",enterEv);
复制代码
我创建datagrid的过程就是这个..然后添加到 Panel 中...可以看到我想触发 enterEv 事件..但无论怎样就是不起作用


function enterEv(e)
{
        console.log("接受到回车了..");
}

Rank: 8Rank: 8

沙发
发表于 2016-4-15 09:28:15 |只看该作者
请设置 editNextOnEnterKey="true"允许回车切换

Archiver|普加软件

GMT+8, 2025-7-16 02:34 , Processed in 1.054924 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部