Home  >  Article  >  Web Front-end  >  jQuery EasyUI API Chinese documentation - DataGrid data table_jquery

jQuery EasyUI API Chinese documentation - DataGrid data table_jquery

WBOY
WBOYOriginal
2016-05-16 17:59:131219browse

Extended from $.fn.panel.defaults , using $.fn.datagrid.defaults overriding defaults .
Dependencies
panel
resizable
linkbutton
pagination
Usage

Copy code The code is as follows:



Copy code The code is as follows:

$('#tt').datagrid({
url:'datagrid_data.json',
columns:[[
{field:'code',title:'Code',width:100},
{field:'name',title:'Name',width:100},
{field:'price ',title:'Price',width:100,align:'right'}
]]
});

数据表格(DataGrid)的特性

其特性扩展自 panel,下列是为 datagrid 增加的特性。

名称

类型

说明

默认值

columns

array

datagrid column 的配置对象,更多详细请参见 column 的特性。

null

frozenColumns

array

和列的特性一样,但是这些列将被冻结在左边。

null

fitColumns

boolean

True 会自动扩大或缩小列的尺寸以适应表格的宽度并且防止水平滚动。

false

striped

boolean

True 就把行条纹化。(即奇偶行使用不同背景色)

false

method

string

请求远程数据的 method 类型。

post

nowrap

boolean

True 就会把数据显示在一行里。

true

idField

string

标识字段。

null

url

string

从远程站点请求数据的 URL

null

loadMsg

string

当从远程站点加载数据时,显示的提示信息。

Processing, please wait …

pagination

boolean

True 就会在 datagrid 的底部显示分页栏。

false

rownumbers

boolean

True 就会显示行号的列。

false

singleSelect

boolean

True 就会只允许选中一行。

false

pageNumber

number

当设置了 pagination 特性时,初始化页码。

1

pageSize

number

当设置了 pagination 特性时,初始化页码尺寸。

10

pageList

array

当设置了 pagination 特性时,初始化页面尺寸的选择列表。

[10,20,30,40,50]

queryParams

object

当请求远程数据时,发送的额外参数。

{}

sortName

string

定义可以排序的列。

null

sortOrder

string

定义列的排序顺序,只能用 'asc' 'desc'

asc

remoteSort

boolean

定义是否从服务器给数据排序。

그렇습니다

바닥글 표시

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn