Jquery DataGrid 中文文档

属性
名称 数据类型 描述 默认值
title, string, The datagrid panel title text. DataGrid面板标题文字。 null

iconCls, string, A CSS class that will provide a background image to be
used as the header icon. 一个CSS类,将提供一个背景图片作为标题图标。 null

border, boolean, True to show datagrid panel border. true则显示DataGrid
面板的边界。 true

width, number, The width of datagrid width. DataGrid的宽度。 auto

height, number, The height of datagrid height. DataGrid的高度。 auto

columns, array, The datagrid columns config object, see column
properties for more details. DataGrid列,参看列的各种属性以
获取更详细的信息。 null

frozenColumns, array, Same as the columns property, but these columns
will be frozen on left. 与Columns属性相同,但将冻结选中的列及其左边的
列。 null

striped, boolean, True to stripe the rows. True,条纹行。 false

method, string, The method type to request remote data. 请求远程数据时采
用的方法类型。 post

nowrap, boolean, True to display data in one line. true则不换行显示数
据。 true

idField, string, Indicate which field is an identity field. 用于设置标识字段。 null

url, string, A URL to request data from remote site. 用于指定一个可以从远程
站点获取请求数据的URL。 null

loadMsg, string, When loading data from remote site, show a prompt
message. 从远程站点加载数据时显示的提示信息。 Processing, please
wait … 处理中,请稍候…

pagination, boolean, True to show a pagination toolbar on datagrid bottom.
True则显示DataGrid底部分页工具栏。 false

rownumbers, boolean, True to show a row number column. True显示行号。 false

singleSelect, boolean, True to allow selecting only one row. True只允许
选中一行,false可以选中多行。 false

fit, boolean, True to set size to fit it’s parent container. True则自动
适应其父容器的大小。 false

pageNumber, number, When set pagination property, initialize the page
number. 如果设置了pagination属性,则用这个属性设置初始页码。 1

pageSize, number, When set pagination property, initialize the page
size.如果设置了pagination属性,则用这个属性初始化页面大小(即每页显示的行数)。 10

pageList, array, When set pagination property, initialize the page size
selecting list. 用于初始化可以设置页面大小(即每页显示的行数)的选择列表。 [10,20,30,40,50]

queryParams, object, When request remote data, sending additional
parameters also. 请求远程数据时发送的查询参数。 {}

sortName, string, Defines which column can be sorted. 定义可排序的列。 null

sortOrder, string, Defines the column sort order, can only be ‘asc’ or
‘desc’. 定义列的排序方式,只能是’asc(顺序)’或’desc(倒序)’。 asc



事件
名称 参数 描述
onLoadSuccess, none, Fires when remote data is loaded successfully. 远程
数据加载成功时触发。

onLoadError, none, Fires when some error occur to load remote data. 加载
远程数据发生错误时触发。

onClickRow, rowIndex、rowData, Fires when user click a row, the
parameters contains:
rowIndex: the clicked row index, start with 0 rowIndex:
rowData: the record corresponding to the clicked row rowData:
用户单击某一行时触发,参数包括:
rowIndex: 选定行的行号,从0开始
rowData: 选定行的数据

onDblClickRow, rowIndex、rowData, Fires when user dblclick a row, the
parameters contains:
rowIndex: the clicked row index, start with 0 rowIndex.
rowData: the record corresponding to the clicked row rowData.
用户双击某一行时触发,参数包括:
rowIndex: 选定行的行号,从0开始
rowData: 选定行的数据

onSortColumn, sort、order, Fires when user sort a column, the
parameters contains:
sort: the sort column field name
order: the sort column order
排序时触发,参数包括:
sort:需要排序的字段名称
order:排序方式

onSelect, rowIndex、 rowData, Fires when user select a row, the
parameters contains:
rowIndex: the selected row index, start with 0 rowIndex.
rowData: the record corresponding to the selected row rowData.
用户选择某一行时触发,参数包括:
rowIndex:选定行的行号,从0开始
rowData:选定行的数据

onUnselect, rowIndex, rowData, Fires when user unselect a row, the
parameters contains:
rowIndex: the unselected row index, start with 0 rowIndex.
rowData: the record corresponding to the unselected row rowData.
用户取消选择某一行时触发,参数包括:
rowIndex: 取消行的行号,从0开始
rowData: 取消行的数据

方法
名称 参数 描述
options, none, Return the options object. 返回options对象。

resize, none, Do resize and do layout. 调整大小和布局。

reload, none, Reload the rows. 重新加载行。

fixColumnSize, none, fix columns size. 设置固定列宽。

loadData, param, Load local data, the old rows will be removed. 重新加载
本地数据,旧的数据会被删除。

getSelected none Return the first selected row record or null. 返回选中
的第一行的记录或null。

getSelections, none, Return all selected rows, when no record selected,
an empty array will return. 返回所有选定行,如果没有选中任何行,则返回空
数组。

clearSelections, none, Clear all selections. 清除所有选择。

selectRow, index, Select a row, the row index start with 0. 选中一行,行
号从0开始。

selectRecord, idValue, Select a row by passing id value parameter. 选择
一行由ID值传递的参数。

unselectRow, index, Unselect a row. 取消选择一行。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值