導航:首頁 > 編程語言 > extjscheckcolumn事件

extjscheckcolumn事件

發布時間:2023-03-13 09:23:55

1. extjs中checkcolumn怎麼默認勾選部分checkbox

查看它對應的dataIndex名、在grid的store載入值時傳個布爾值應該就行了

2. extjs 用Ext.grid.CheckColumn()時 為什麼報 Cannot read property 'dataIndex' of undefined ext-all.js

請確認你的js文件使用的Ext的相關js文件導入成功。

發下你js代碼片段

3. extjs grid 中 ColumnModel 小問題

1.可以不配置editor 項,來 單擊單元格時便不自可編輯或者手動設置setEditable( Number col, Boolean editable ) 參數分別為行號與是否編輯。
2.正則不靈也許你沒監聽到那個事件,只能輸入數字可以用Ext.form.NumberField 配置相關項可達到目的,只能輸入正整數。

4. extjs GridPanel怎麼添加ComboBox,TextField等form控制項

就是用extjs鍵表格。。。用grid吧。。給你個例子

Ext.onReady(function(){

/**

*Handlerspecifiedforthe'Available'columnrenderer

*@param{Object}value

*/

functionformatDate(value){

returnvalue?value.dateFormat('Md,Y'):'';

}

//shorthandalias

varfm=Ext.form;

//

//

//thedatastore(createdbelow)

varcm=newExt.grid.ColumnModel({

//

defaults:{

sortable:true//

},

columns:[{

id:'common',

header:'CommonName',

dataIndex:'common',

width:220,

//useshorthandaliasdefinedabove

editor:newfm.TextField({

allowBlank:false

})

},{

header:'Light',

dataIndex:'light',

width:130,

editor:newfm.ComboBox({

typeAhead:true,

triggerAction:'all',

//

transform:'light',

lazyRender:true,

listClass:'x-combo-list-small'

})

},{

header:'Price',

dataIndex:'price',

width:70,

align:'right',

renderer:'usMoney',

editor:newfm.NumberField({

allowBlank:false,

allowNegative:false,

maxValue:100000

})

},{

header:'Available',

dataIndex:'availDate',

width:95,

renderer:formatDate,

editor:newfm.DateField({

format:'m/d/y',

minValue:'01/01/06',

disabledDays:[0,6],

disabledDaysText:''

})

},{

xtype:'checkcolumn',

header:'Indoor?',

dataIndex:'indoor',

width:55

}]

});

//createtheDataStore

varstore=newExt.data.Store({

//

autoDestroy:true,

//loadremotedatausingHTTP

url:'plants.xml',

//specifyaXmlReader()

reader:newExt.data.XmlReader({

//recordswillhavea'plant'tag

record:'plant',

//

fields:[

//the'name'belowmatchesthetagnametoread,except'availDate'

//whichismappedtothetag'availability'

{name:'common',type:'string'},

{name:'botanical',type:'string'},

{name:'light'},

{name:'price',type:'float'},

//

{name:'availDate',mapping:'availability',type:'date',dateFormat:'m/d/Y'},

{name:'indoor',type:'bool'}

]

}),

sortInfo:{field:'common',direction:'ASC'}

});

//createtheeditorgrid

vargrid=newExt.grid.EditorGridPanel({

store:store,

cm:cm,

renderTo:'editor-grid',

width:600,

height:300,

autoExpandColumn:'common',//

title:'EditPlants?',

frame:true,

clicksToEdit:1,

tbar:[{

text:'AddPlant',

handler:function(){

//'sstore

varPlant=grid.getStore().recordType;

varp=newPlant({

common:'NewPlant1',

light:'MostlyShade',

price:0,

availDate:(newDate()).clearTime(),

indoor:false

});

grid.stopEditing();

store.insert(0,p);

grid.startEditing(0,0);

}

}]

});

//

store.load({

//storeloadingisasynchronous,

callback:function(){

Ext.Msg.show({

title:'StoreLoadCallback',

msg:'storewasloaded,dataavailableforprocessing',

modal:false,

icon:Ext.Msg.INFO,

buttons:Ext.Msg.OK

});

}

});

});

5. Extjs new Ext.grid.CheckColumn的事件和用法

<ext:CheckColumn runat="server" Text="選擇" ID="Selected" Selectable="true" Editable="true" Sealed="true" TplWriteMode="Append">
<DirectEvents>
<CheckChange OnEvent="Selected_ChangeEvent">
<ExtraParams>
<ext:Parameter Encode="true" Mode="Raw" Name="ID" Value="record.data.ID">
</ext:Parameter>
</ExtraParams>
</CheckChange>
</DirectEvents>
</ext:CheckColumn>

說實話這個控制項真的很惡心,我找了好長時間才將他的後台事件找到,但是問題是怎麼能讓它選中呢?看網上的高手們說無法使用GridPanel本身的CheckColumn,要採用第三方擴展的控制項實現,誰知道怎麼讓他呈現選中狀態呢?期待大家的發現

6. Extjs怎麼給Grid增加一個CheckBox列

首先導入擴展CheckColumn的JS文件在extjs文件包的/examples/ux/CheckColumn.js。 然後將你要用來顯示true/false的那列的版xtype配置成checkcolumn。 例子: {xtype:"checkcolumn",header:"頭部權",dataIndex:"xxxx"}

閱讀全文

與extjscheckcolumn事件相關的資料

熱點內容
怎麼把ps文件變成源文件 瀏覽:807
如何把圖片放進這個文件夾 瀏覽:530
誰有qq認證圖標復制 瀏覽:881
2014年web伺服器測試工具 瀏覽:192
win7鏡像文件怎麼用 瀏覽:983
多數據can怎麼發送 瀏覽:997
什麼是夏威夷果種植技術app 瀏覽:160
上海學習編程哪個地方好 瀏覽:958
股票軟體與交易編程軟體哪個好 瀏覽:216
linux如何查看一個文件的位置 瀏覽:911
c頭文件無法打開源文件stdafx 瀏覽:750
蘋果x的桌面上可以建文件夾 瀏覽:368
ug8532位破解版安裝教程 瀏覽:490
電腦網路如何重新驅動 瀏覽:125
win10連接伺服器命令 瀏覽:228
盧克raid活動20升級卷 瀏覽:969
機票預訂什麼網站好 瀏覽:690
讀寫xml配置文件 瀏覽:153
java爬蟲解析html 瀏覽:861
約瑟夫集合java 瀏覽:275

友情鏈接