乙個擴充套件的 GridPanel

2021-08-24 17:17:34 字數 1450 閱讀 9368

分頁後可儲存checkbox的選擇狀態。

/*** 封裝的grid

* 功能:分頁後仍保持選中狀態

* 約定:root為list, totalproperty為total, grid的第一列必須為id

*/ext.namespace('ext.ux.grid');

ext.ux.grid.mygrid = ext.extend(ext.grid.gridpanel,,{}],

* @name=dataindex

* @visiable: set this record to the cm(grid header) default(true)

* @type: array (records)

*/ cm_jr_record: null,

/** true to add a bottom paging bar

* @de****t: true

* @type: boolean

*/pagingbar: true,

/** config paging bar if pagingbar set true

* @type: object

* @default: - 總記錄數: ',

* emptymsg: '0條記錄'}

*/pagingconfig: 條到 條記錄,一共 條",

emptymsg: '0條記錄',

},viewconfig:,

//private

initcomponent: function()

if(this.pagingbar)

if(this.keepselectedonpaging)

ext.ux.grid.mygrid.superclass.initcomponent.call(this);

},/*

* init the grid use the config options

* @return: void

* @params: none

*/init_sm_cm_ds: function()

if(this.checkbox)

for(var i=0;i 0)

return true;

else

return false;}}

)//**************************這是個demo*****************

var cm_jr_record = [

,,, , , , , , ];

var mygrid = new ext.ux.grid.mygrid(

},else});

});}});

} }

}]});

mygrid.render();

乙個簡單的PHP擴充套件

php擴充套件開發 安裝php posix定時器 timer settime 我們先假設業務場景,是需要有這麼乙個擴充套件,提供乙個叫ccvita string的函式,他的主要作用是返回一段字元。這個業務場景實在太假,大家就這麼看看吧 對應的php 可能是這樣 function ccvita str...

easyui datebox擴充套件乙個清空的例項

步驟一 拓展外掛程式 給時間框控制項擴充套件乙個清除的按鈕 fn.datebox.defaults.cleantext 清空 function handler function target extend fn.datebox.defaults,jquery 步驟二 如果需要將清空按鈕漢化,在eas...

擴充套件乙個 layui 模組

layui 官方提供的模組有時可能還無法滿足你,或者你試圖按照layer的模組規範來擴充套件乙個模組。那麼你有必要認識layui.define 方法。並粗略了解一下extend 我糾結過這個一小段時間 下面就讓我們一起擴充套件乙個layui模組吧 第一步 確認模組名,假設為 mymod,然後新建乙個...