|
屬性 |
資料類型 |
備忘 |
預設值 |
|
align |
string |
left, center, right. |
left |
|
classes |
string |
設定列的css。多個class之間用空格分隔,如:‘class1 class2‘ 。表格預設的css屬性是ui-ellipsis |
empty string |
|
datefmt |
string |
”/”, ”-”, and ”.”都是有效日期分隔符號。y,Y,yyyy 年YY, yy 月m,mm for monthsd,dd 日. |
ISO Date (Y-m-d) |
|
defval |
string |
查詢欄位的預設值 |
空 |
|
editable |
boolean |
儲存格是否可編輯 |
false |
|
editoptions |
array |
編輯的一系列選項。{name:’__department_id’,index:’__department_id’,width:200,editable:true,edittype:’select’,editoptions: {dataUrl:”${ctx}/admin/deplistforstu.action”}},這個是示範動態從伺服器端擷取資料。 |
empty |
|
editrules |
array |
編輯的規則{name:’age’,index:’age’, width:90,editable:true,editrules: {edithidden:true,required:true,number:true,minValue:10,maxValue:100}},設定 年齡的最大值為100,最小值為10,而且為數字類型,並且為必輸欄位。 |
empty |
|
edittype |
string |
可以編輯的類型。可選值:text, textarea, select, checkbox, password, button, image and file. |
text |
|
fixed |
boolean |
列寬度是否要固定不可變 |
false |
|
formoptions |
array |
對於form進行編輯時的屬性設定 |
empty |
|
formatoptions |
array |
對某些列進行格式化的設定 |
none |
|
formatter |
mixed |
對列進行格式化時設定的函數名或者類型
{name:’sex’,index:’sex’, align:’center’,width:60,editable:true,edittype:’select’,editoptions: {value:’0:待定;1:男;2:女’},formatter:function(cellvalue, options, rowObject){
var temp = “<img src=’${ctx}/jquery-ui-1.7.2.custom/css/img/”
if(cellvalue==1){
temp = temp +”user-white.png”;
} else if(cellvalue==2){
temp = temp +”user-white-female.png”;
} else {
temp = temp + “user-silhouette.png”;
}
temp = temp + “‘ border=’0′ />”
return temp;
}},//返回性別的表徵圖。 |
none |
|
hidedlg |
boolean |
是否顯示或者隱藏此列 |
false |
|
hidden |
boolean |
在初始化表格時是否要隱藏此列 |
false |
|
index |
string |
索引。其和後台互動的參數為sidx |
empty |
|
jsonmap |
string |
定義了返回的json資料對應 |
none |
|
key |
boolean |
當從伺服器端返回的資料中沒有id時,將此作為唯一rowid使用只有一個列可以做這項設定。如果設定多於一個,那麼只選取第一個,其他被忽略 |
false |
|
label |
string |
如果colNames為空白則用此值來作為列的顯示名稱,如果都沒有設定則使用name 值 |
none |
|
name |
string |
表格列的名稱,所有關鍵字,保留字都不能作為名稱使用包括subgrid, cb and rn. |
Required |
|
resizable |
boolean |
是否可以被resizable |
true |
|
search |
boolean |
在搜尋模式下,定義此列是否可以作為搜尋列 |
true |
|
searchoptions |
array |
設定搜尋參數 |
empty |
|
sortable |
boolean |
是否可排序 |
true |
|
sorttype |
string |
用在當datatype為local時,定義搜尋列的類型,可選值:int/integer - 對integer排序float/number/currency - 排序數字date - 排序日期text - 排序文本 |
text |
|
stype |
string |
定義搜尋元素的類型 |
text |
|
surl |
string |
搜尋資料時的url |
empty |
|
width |
number |
預設列的寬度,只能是象素值,不能是百分比 |
150 |
|
xmlmap |
string |
定義當前列跟返回的xml資料之間的映射關係 |
none |
|
unformat |
function |
‘unformat’儲存格值 |
null |