vgolive.search.PagingGrid使用手册及API


Object »dijit._Widget

dijit扩展-分页表格组件
必需 dojo 1.4以上版本

使用方法

第一步:引入相关CSS
 
第二步:引入相关组件
 
第三步:调用方法
    Javascript Code:
 

    HTML Code:

 

如下图:

 

API

Namespace:
vgolive.search
Assembly:

Constructors


vgolive.search.PagingGrid(parameters:Object,domNode:Object)
parameters:{
    query:Object,   //查询对象集
    store:dojox.data.ServiceStore,   //支持数据集,包括ServiceStore所有子类
              [dojo.data.ItemFileReadStore,]
              [dojo.data.ItemFileWriteStore,]
    pageSize:Integer,   //每页显示条目数,缺省:10
    toolbar:Array,     //工具栏
    layout:Array,    //布局
    plugins:Object,    //表格插件
    titleLabel:String,  //标题,如:样例:vgolive.search.PagingGrid
}
domNode

Properties

store
数据集
支持:dojox.data.ServiceStore  及所有子类
              dojo.data.ItemFileReadStore,
              dojo.data.ItemFileWriteStore,
query查询对象集,参考样例-params定义
pageSize每页显示条目数,数值类型,缺省:10
structure布局数组,参考样例-layout定义
plugins插件,参考样例-plugins定义
selectionMode
选择条目模式,字符串类型,只能选择"multiple"或"single",缺省:multiple
注:使用此属性,必须启用dojox.grid.enhanced.plugins.IndirectSelection插件
rowSelector
行选择块宽度,字符串类型,缺省:"0px"
toolbar工具栏数组,参考样例-toolbar定义
firstLabel第一页按钮标签,字符串类型:缺省:"第一页"
prevLabel上一页按钮标签,字符串类型:缺省:"上一页"
nextLabel下一页按钮标签,字符串类型:缺省:"下一页"
lastLabel最后一页按钮标签,字符串类型:缺省:"最后一页"
titleLabel标题标签,字符串类型
roles权限控制域,多值用分号分隔,如:LocalDomainAdmins;[UserModifier];admin
注:为vgolive.search.api.SearchStore定制
filter过滤条件,多值用分号分隔,如:domain:api.vgolive.com;dbpath:help;form:HelpForm
注:为vgolive.search.api.SearchStore定制

Methods

startup()
<Description>
changeStructure(structure:Array)

hideHeader(flag:boolean)

hideHeaderFilter(flag:boolean)

canSort(index:Integer)
排序,如果指定某列不排序,则设置属性canSort=false 例: 
var webLayout = [
    {name : '标题', width : '80%', field : 'title'}, 
    {name : '创建日期', width : 'auto', field : 'created'}, 
    {name : '描述', field : 'text', canSort : false
]; //描述一列为不能排序列
未指定field列也不能进行排序功能
firstPage()跳转至第一页
prevPage()跳转至上一页
nextPage()跳转至下一页
lastPage()跳转至最后一页
gotoPage(pageNumber:Integer)
跳转至指定页
refreshPage()刷新当前页
filterPage()
根据过滤条件,搜索符合条件的条目
close()
关闭/销毁对象
getSelected()
获取所有选择的条目,例:
........
var items = pagingGrid.getSelected();
dojo.forEach(items, function(item) {
    alert(dojo.toJson(item);
});
........
getCellData(item:Object,fieldName:string)
获取指定条目中的指定域值,例:
alert(pagingGrid.getCellData(item,"id"));
getStore()
获取当前数据集对象

Events

onComplete当数据提取完成后
onError当数据提取时出错后


References
dojox.grid.EnhancedGrid:http://docs.dojocampus.org/dojox/grid/EnhancedGrid

原文地址http://goo.gl/jxHF

源码及样例http://download.csdn.net/source/2342522

                  http://bbs.lotus-gateway.com/viewtopic.php?f=3&t=1684

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值