DataGrid 屬性
覆寫了 $.fn.datagrid.defaults.
|
Column 屬性
DataGrid Columns 是一個數組對象, 數組裏的對象也是一個數組,數組裏的每一個小對象就是一個列字段,例如:
columns:[[ {field:'itemid',title:'Item ID',rowspan:2,width:80,sortable:true}, {field:'productid',title:'Product ID',rowspan:2,width:80,sortable:true}, {title:'Item Details',colspan:4} ],[ {field:'listprice',title:'List Price',width:80,align:'right',sortable:true}, {field:'unitcost',title:'Unit Cost',width:80,align:'right',sortable:true}, {field:'attr1',title:'Attribute',width:100}, {field:'status',title:'Status',width:60} ]]
|
Events(事件)
|
Methods(方法)
Name | Parameter | Description |
---|---|---|
options | none | 返回所有屬性 |
resize | none | 重置大小布局 |
reload | none | 重新加載數據 |
fixColumnSize | none | 調整列的大小 |
loadData | param | 裝載數據,以前的數據會被移除 |
getSelected | none | 返回選中的行,沒有則返回空 |
getSelections | none | 返回所有的行,空則返回空數組 |
clearSelections | none | 取消所有選中 |
selectRow | index | 選中一行,參數爲行號 |
selectRecord | idValue | 根據主鍵查詢出一條記錄 |
unselectRow | index | 取消選中一行 |