我正在使用 dojo.gridx
来显示我的数值。有时用户可以创建新的行。因此,我添加了一个新的按钮,当点击 "newRow" 按钮时,将调用 onclick 方法。
在该方法中,已编写了创建新行的代码。我的代码如下所示。
addRow:
function() {
var that = this;
var gridIdLocal = dijit.byId('GridId');
that.lastIndex+=1; ( last index count I get externally)
var newRow = {
Id : '',
ClassDES:'',
createdDate: that.getTodayDate(),
activatedDate:that.getTodayDate(),
deactivedDate:'',
activeStatus:'Y',
id : lastIndex
};
gridIdLocal.store.newItem(newRow);
gridIdLocal.store.save();
},
通过这段代码,我能够创建一个新的行,但是我想让我的鼠标光标指向新添加的行的第二列(ClassDES)。
在 dojo.gridx
中,我该如何实现这个功能?