导航:首页 > 编程语言 > 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事件相关的资料

热点内容
iphone6s单手模式 浏览:79
vivo怎么找删除的app软件 浏览:852
360装机大师怎么用教程 浏览:168
高一编程语言是什么 浏览:421
phpword插入图片 浏览:261
数控编程s300什么意思 浏览:871
linuxab压力测试 浏览:818
编程语言为什么是c 浏览:797
悦me只能网关密码错误 浏览:844
三星交集工具 浏览:939
数据库中怎么复制表结构 浏览:417
戴尔win10平板装系统吗 浏览:816
编程的变量名有哪些 浏览:124
360版本海岛奇兵下载 浏览:370
常州ug数控编程培训哪个学校好 浏览:802
数据库的不等于怎么写 浏览:664
qq关闭送礼物动画 浏览:128
京东健康码在哪个文件夹里 浏览:891
数据线黑了怎么消除 浏览:883
iphone6快捷锁屏 浏览:55

友情链接