我想添加自定義行作爲grid.Supose第一排在這個環節添加自定義行作爲第1行中網格ExtJS的
http://ngs.woc.noaa.gov/storms/scripts/ext-3.2.1/examples/grid/row-editor.html
我想在這個格中插入自定義hardcorded值作爲第一行。如何做到這一點我不想與store.Bascially做到這一點,我想頭之後添加的div和填充我的字符串成
感謝
我想添加自定義行作爲grid.Supose第一排在這個環節添加自定義行作爲第1行中網格ExtJS的
http://ngs.woc.noaa.gov/storms/scripts/ext-3.2.1/examples/grid/row-editor.html
我想在這個格中插入自定義hardcorded值作爲第一行。如何做到這一點我不想與store.Bascially做到這一點,我想頭之後添加的div和填充我的字符串成
感謝
grid.getStore().insert(index, records)
將做到這一點,如果你設置index = 0
您可以使用此代碼:
var grid = Ext.getCmp("yourGridId").getStore()
var myArray=new Array()
myArray['id'] = '1';
myArray['value'] = 'Dummy';
var rec = new Ext.data.Record(myArray);
grid.insert(0, rec);
爲什麼downvote? –
這是正確的答案,爲什麼這個人downvote確實有道理 – Naresh