jqgrid 中文幫助

1 colModel :   要呈現字段的屬性設置
1.1 align:定義數據相對單元格的對齊方式.string  left
1.2 datefmt: 日期格式,     string  Y-m-d
1.3 editable: 定義字段是否可編輯 boolean  false
1.4 defval : 搜索字段的默認值,(只用於自定義搜索) string  empty
1.5 edittype: 該字段控件類型(text, textarea, select, checkbox, password, button, image , file) string  text
1.6 surl:只有在自定義搜索和edittype屬性爲select和描述的url得到select 的element%  string empty
1.7 editoptions:針對edittype配置的控件類型的屬性設置 array  empty array
1.7.1 value: 依據edittype,配置屬性%(詳見: editoptions的value配置)mixed none
1.7.2 dataUrl:這個屬性只適用與edittype屬性爲select (指定select的數據源edittype:"select",editoptions:{dataUrl:'test.txt', defaultValue:'Intime'})      string  empty
1.7.3 dataInit:當控件被創建時僅觸發1次 function  null
1.7.4 dataEvents: 給當前控件追加事件處理% array  empty array
1.7.5 defaultValue:默認值(可以是函數返回值) mixed  none
1.7.6 其他:可設置控件的任何有效屬性editoptions:{size:10,maxlength:8}mixed none
1.8 editrules: 設置編輯字段的控件的規則  array  empty array
1.8.1 edithidden:該字段隱藏時, 此屬性可以控制是否可編輯 boolean  false
1.8.2 required:是否驗證空數據 boolean  false
1.8.3 number:是否驗證數字 boolean  false
1.8.4 integer:是否驗證整數 boolean  false
1.8.5 minValue:驗證最小值 number(integer)  empty
1.8.6 maxValue:驗證最大值 number(integer)  empty
1.8.7 email:是否驗證email boolean  false
1.8.8 url:是否驗證是有效的網址 boolean  false
1.8.9 date:是否驗證日期 boolean  false
1.8.10 time:是否驗證時間 boolean  false
如果此字段不是必填,如果填了才驗證是否是email  那麼應該配置 email:true, required:false
1.9 formoptions:設置該字段相對錶單中的相關設置 array  empty array
1.9.1 elmprefix:如果設置,則會在控件前面出現該設置 string  empty 
1.9.2 elmsuffix:如果設置,則會在控件後面出現該設置 string  empty
1.9.3 label: 如果設置,則會替換colNames設置的名稱 string  empty
1.9.4 rowpos:設置該字段所在行的位置,從1開始計數  number empty
1.9.5 colpos:設置該字段所在列的位置,從1開始計數 number empty
1.10 formatoptions:設置特定列的格式,覆蓋語言文件的默認值 array  empty array
1.11 formatter:指定formatoptions設置格式的類型 mixed none
1.11.1 integer:當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.1.1 thousandsSeparator: 每千位分隔符 string empty
1.11.1.2 defaulValue:在沒有數據的情況下的默認值 string empty
1.11.2 number: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.2.1 decimalSeparator: 小數位分隔符 string empty
1.11.2.2 thousandsSeparator:每千位分隔符 string empty
1.11.2.3 decimalPlaces:小數位數 string empty
1.11.2.4 defaulValue:在沒有數據的情況下的默認值 string empty
1.11.3 currency: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.3.1 decimalSeparator: 小數位分隔符 string empty
1.11.3.2 thousandsSeparator: 每千位分隔符 string empty
1.11.3.3 decimalPlaces: 小數位數 string empty
1.11.3.4 defaulValue: 在沒有數據的情況下的默認值 string empty
1.11.3.5 prefix:在數據前面添加的文本比如貨幣符號”$” string empty
1.11.3.6 suffix: 在數據後面添加的文本比如貨幣符號”$” string empty
1.11.4 date: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.4.1 srcformat:原格式 string empty
1.11.4.2 newformat:新的輸出格式 string empty
1.11.5 email: 當formatter指定爲 email類型,直接使這個email加href string empty
1.11.6 link: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.6.1 target:默認爲empty如果設置,則創建一個以單元格的值和target屬性的鏈接string empty
1.11.7 showlink: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.7.1 baseLinkUrl:鏈接. string empty
1.11.7.2 showAction:附加值,在baseLinkUrl後面 . string empty
1.11.7.3 addParam:額外參數. string empty
1.11.7.4 target:如果設置,增加1條附加屬性. string empty
1.11.7.5 idName:是第1個參數,之後由showAction補充,默認情況下,這是id string empty
1.11.8 checkbox: 當formatter指定爲此屬性時, formatoptions可以設置以下屬性.
1.11.8.1 disabled:默認true禁止改變狀態,如果設置爲false是可以改變的 boolean
1.11.9 select: 當edittype ,formatter指定爲此屬性時, editoptions:{value:"1:One;2:Two"}值是1,2顯示的則是one,two string empty
colModel:[{name:'myname', edittype:'select', formatter:'select', formatoptions:{baseLinkUrl:'myrul.php', addParam: '&action=edit', idName:'myid'}, ...}
將會得到http://localhost/myrul.php?myid=123&action=edit
1.12 unformat:可以爲formatter指定自定義格式的方法 function null
1.13 hidedlg:如果設置爲true在顯示/隱藏字段功能中,該字段將不會出現% boolean false
1.14 hidden:該字段是否隱藏 boolean false
1.15 index:排序時, sidx的參數 string  empty
1.16 jsonmap:定義json映射這個字段時的json字符串 string empty
1.17 xmlmap:定義xml文件映射這個字段時的xml字符串 string empty
1.18 key:如果服務器端沒有定義id,可以設置字段爲行號,只有一個字段可以設置此屬性,只認可第1個,其他的將被忽略. boolean false
1.19 name:設置此字段的唯一名稱,此屬性是必須要設置的, string empty
1.20 label:當colNames爲空,則標題顯示此設置.如果colNames數組和此設置同時爲空,則標題顯示name屬性. string empty
1.21 resizable:設置此字段是否可編輯 boolean true
1.22 search:該字段是否允許搜索(查詢) boolean true
1.23 stype:設置搜索時的數據類型 string text
1.24 searchoptions:配置搜索選項 array empty array
1.24.1 dataUrl:該屬性只適用於 stype:’select’  string empty
1.24.2 dataInit:等同於editoptions的dataInit function null
1.24.3 dataEvents:等同於editoptions的dataEvents  array empty array
1.24.4 attr:可以設置創建的元素的有效屬性 object null
1.24.5 searchhidden:該字段隱藏時,此屬性可控制是否可搜索 boolean false
1.24.6 defaultValue:默認值 string empty
1.24.7 sopt:比較運算符,可任意組合('eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc')array empty array
等於      eq         =             
不等於    ne         <>
小於       lt          <
小於等於   le          <=
大於       gt          >
大於等於   ge          >=
以*開頭    bw         like
不以*開頭  bn         not like
在    in          in
不在    ni          not in
以*結尾    ew         like
不以*結尾  en         not like
包含    cn         like
不包含    nc         not like
1.25 sortable:設置該字段是否進行排序 boolean true
1.26 sorttype:排序的數據類型 string text
1.27 width:寬度,不能設置百分比 number 150
2 navGrid:功能按鈕(增刪改查,搜,刷新)設置
2.1 top:距離頂端的象素 number(integer) 0
2.2 left:距離左邊的象素 number(integer) 0
2.3 width:寬度 number(integer) 300
2.4 height:高度 number(integer) auto
2.5 dataheight:表單內容距離按鈕高度 number(integer) auto
2.6 modal: 是否模態窗體 boolean false
2.7 drag:是否可拖動 boolean true
2.8 resize: 是否可改變大小 boolean true
2.9 url:提交的URL,如果設置則替換editurl string empty
2.10 mtype:請求類型post | get string post
2.11 editData:提交到服務器的數據 array empty array
2.12 recreateForm:每次操作是否創建新的表單 boolean false
2.13 jqModal: 設置爲true使用存在的jqModal插件的對話框。如果被設置爲true和插件不存在jqGrid使用它自己的方式來創造對話框, 比如會影響到日期插件,true和false不同的效果 boolean true
2.14 addedrow:%
2.15 topinfo:頭部信息 string empty
2.16 bottominfo:底部信息 string empty
2.17 saveicon:保存的圖片,第一項啓用/禁用的圖片, 第二個項目告訴哪裏放置圖片到文本的左或右. 第三項對應的有效UI圖片樣式 [true,”left”,”ui-icon-disk”]
2.18 closeicon:取消的圖片同上 [true,”left”,”ui-icon-close”]
2.19 savekey:保存的快捷鍵,默認回車 [false,13]
2.20 navkeys:移動上個,下個的快捷鍵 ,默認上下箭頭 [false,38,40]
2.21 checkOnSubmit:保存時,是否彈出再次確認對話框,僅用在編輯模式 boolean false
2.22 checkOnUpdate:取消時,是否彈出再次確定對話框,僅用在新增和編輯模式 boolean false
2.23 closeAfterAdd:添加模式時,添加記錄後是否關閉對話框 boolean false
2.24 clearAfterAdd:添加數據時,是否清空上1次的數據 boolean true
2.25 closeAfterEdit:編輯模式時,編輯完成後是否關閉對話框 boolean false
2.26 reloadAfterSubmit:操作完成後,是否重新加載數據 boolean true
2.27 closeOnEscape:是否關聯esc鍵 boolean false
2.28 ajaxEditOptions:% object empty object   

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章