dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.grid.enhanced.plugins.Pagination");
dojo.require("dojox.grid.cells");
dojo.require("dojox/grid/_CheckBoxSelector");
dojo.require("dojo.data.ItemFileWriteStore");
var grid = new dojox.grid.EnhancedGrid({
jsid: "grid",
style: 'width:300px',
refresh: function(){
var oThis = this;
oThis.setStore(new dojo.data.ItemFileWriteStore({
url: '这里写上你的请求地址ACTION,servlet,json文件等',
handleAs: "json"
}));
},
structure: [{
type : "dojox.grid._CheckBoxSelector",
width : 3
},[
new dojox.grid.cells.RowIndex({width: 2, name:''}),
{name: '列1, field: 'col1'},
{name: '列2', field: 'col2'}
]],
columnReordering: true,
rowsPerPage: "20",
plugins: {
pagination: {
//pageSizes: seit.gx.pageSize4Grid,
pageSizes: [],
description: true,
sizeSwitch: true,
pageStepper: true,
gotoButton: true,
maxPageStep: 4,
position: "bottom"
}
},
'onCellClick': function(e){
alert(e.rowIndex);
},
});
grid.refresh();
grid.set("onCellClick", function(e){//点击事件
var item = grid.getItem(e.rowIndex);
store = grid.store,
name = store.getValue(item, "id"),
datasourceCell= 3,//数据源
collectCell= 4,//采集
ri = e.rowIndex,//点击的行号
ci = e.cellIndex,//点击的列号
item = grid.getItem(ri);
});
更多信息请查看 java进阶网 http://www.javady.com
分享到:
相关推荐
struts2-dojo-plugin-2.3.15.3.jar.zip
struts2-dojo-plugin-2.2.1.jar, 直接导入到Struts2项目里即可,注意版本。
struts2-dojo 跨域时解决拒绝访问的问题
struts2-dojo-plugin-2.3.4 jar 日期控件的jar包 需要的自行下载
struts2-dojo-plugin-2.1.6.jar 解决了datetimepicker显示月份乱码的问题,显示9、10、11、12月份时出现乱码,本包修改了该bug
dojo-release-1.4.2-src.tar.gz
struts2-dojo-plugin-2.3.1.2.jar
dojo-release-1.6.1-src.zip
NULL 博文链接:https://mojianpo.iteye.com/blog/753665
goz-dojo.0.3.1.tar-源码.rar
struts2-dojo-plugin-2.1.2.jar CSDN大多下载不了,所以上传!
dojo扩展grid(带刷新函数复选框等功能).js
struts2-dojo-plugin-2.2.3.jar struts2-dojo-plugin-2.2.3.jar
这是最新的struts2日历控件的jar文件
不好意思,上一个资源没有改完全!csdn不让删除。只好重新提交一个!注意清除本地浏览器缓存文件!
dojo-release-1.4.0.tar
dojo-release-1.4.0.zip
dojo-release-1.3.0.tar
dojo-release-1.0.3-src.zip