導航:首頁 > 編程語言 > 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事件相關的資料

熱點內容
ps3文件分割視頻 瀏覽:280
微信圖片一鍵轉發軟體 瀏覽:331
如何判斷s200plc編程電纜 瀏覽:691
太原編程培訓班哪個好 瀏覽:171
樹葉吹奏教程 瀏覽:6
社交app帶來了哪些社會問題 瀏覽:394
如何安裝愛寶8800數據採集器 瀏覽:712
文件保存了怎麼找不到了 瀏覽:476
彩票網站怎麼辨真假 瀏覽:840
pr找不到該文件 瀏覽:963
java移除panel 瀏覽:354
jsp填充jsp 瀏覽:166
海關外貿大數據在哪裡查 瀏覽:381
思特奇java筆試題 瀏覽:121
葫蘆俠在手機中的文件名 瀏覽:813
plc編程應該怎麼收錢 瀏覽:584
c語言中源文件由什麼組成 瀏覽:890
linuxhttpdphp配置文件 瀏覽:607
拆單數據要怎麼保存 瀏覽:17
mac電腦怎樣壓縮文件到100m 瀏覽:645

友情鏈接