更新 dojox.grid.DataGrid
我配置了 dojox.grid.DataGrid,并且希望在用户单击按钮时使用不同的值填充数据网格。
我已尝试以下代码,但它不起作用:
var employees2 = [
{name:"Jane", department:"engineering"},
{name:"Mary", department:"engineering"},
{name:"Julie", department:"sales"}
];
console.info("grid is "+grid.toString());
employeeStore2 = new dojo.store.Memory({data:employees2, idProperty: "name"});
grid.setStore(employeeStore2);
employeeStore2.close();
我在这里设置了示例: http://jsfiddle.net /nonie/kx72T/
任何帮助都会很棒。
I have a dojox.grid.DataGrid configured and I want to populate a data grid with different values when a user clicks a button.
I have tried the following code but it does not work:
var employees2 = [
{name:"Jane", department:"engineering"},
{name:"Mary", department:"engineering"},
{name:"Julie", department:"sales"}
];
console.info("grid is "+grid.toString());
employeeStore2 = new dojo.store.Memory({data:employees2, idProperty: "name"});
grid.setStore(employeeStore2);
employeeStore2.close();
I have setup the example here: http://jsfiddle.net/nonie/kx72T/
Any help would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在你的例子中,事件 onclick 按钮不起作用......
我认为在 showList2 方法中,你应该写这样的东西
In your example, the event onclick button doesn't work....
I think in showList2 method, you should write something like this