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. 取消選擇一行。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章