EXTJS 4.2 资料 控件之radiogroup 的用法
最近在EXTJS4.2开发项目,radiogroup的用法,主要是和grid之间的编辑功能;看了好多资料都不对,特此在这里备注记录
代码如下,
1.这是一段Win窗体上的两个单选按钮,设置单选按钮都是选择“是”
a、
{
xtype: 'fieldcontainer',
layout: 'hbox',
defaults: {
flex:
},
items: [{
xtype: 'radiogroup',
fieldLabel: '手机验证',
width: ,
items: [
{ boxLabel: '是', name: 'PhoneValidate', inputValue: 'true', checked: true },
{ boxLabel: '否', name: 'PhoneValidate', inputValue: 'false' }
]
}, {
xtype: 'radiogroup',
fieldLabel: '邮箱验证',
width: ,
items: [
{ boxLabel: '是', name: 'EmailValidate', inputValue: 'true', checked: true },
{ boxLabel: '否', name: 'EmailValidate', inputValue: 'false', }
]
}
]
}
b、错误代码:

2.grid 行操作代码:
{
header: '操作',
xtype: 'actioncolumn',
width: ,
items: [{
//这里直接通过URL设置图标
icon: '/Resources/Images/16x16/blue16_020.gif',
tooltip: '编辑',
//这里是图标的点击事件
//参数中有点击行的record , 所以很方便做处理
handler: function (grid, rowIndex, colIndex) {
update();
}
}, ' ', {
icon: '/Resources/Images/16x16/blue16_013.gif',
tooltip: '删除',
handler: function (grid, rowIndex, colIndex) {
deleted();
}
}]
}
3.update() 代码片段:
function update() {
var selectedData = grid.getSelectionModel().getSelection()[].data;
if (selectedData.length < )
{ Ext.MessageBox.alert('提示', '请选择要编辑的记录!'); return; }
else
{
win.show();//这是弹出窗体
form.form.loadRecord(grid.getSelectionModel().getSelection()[]);
form.form.findField('PhoneValidate').setValue('false');//这个手机验证单选按钮
form.form.findField('EmailValidate').setValue('false');//这个邮箱验证单选按钮
}
}
4.弹出效果图:

EXTJS 4.2 资料 控件之radiogroup 的用法的更多相关文章
- EXTJS 4.2 资料 控件之checkboxgroup的用法(动态数据)
在开发中遇到两种情况:第一在新增窗体时,要动态加载CheckBox项:第二在修改时不但需要加载所有CheckBox项,还要并且选中之前新增时的选项 如图这是在修改页面的效果: 1.在新增窗体中动态加载 ...
- EXTJS 4.2 资料 控件之checkboxgroup的用法(静态数据)
1.页面 1.1点击‘横幅’,需要动态显示隐藏文本框 { xtype: 'fieldset', title: '指定附加图&横幅设置', collapsible: true, items: [ ...
- EXTJS 3.0 资料 控件之 html 潜入label用法
这是在Extjs 中插入html 控件label! html: "<div><label id='howMany'>您共选中了</label><br ...
- EXTJS 3.0 资料 控件之 combo 用法
EXTJS combo 控件: 1.先定义store //年款 var comboData_ReleasYear = [ ['], ['], ['], ['] ]; 2.定义combo控件 { lay ...
- EXTJS 4.2 资料 控件之combo 联动
写两个数据源: 1.IM_ST_Module.js { success:true, data:[ { ModuleId: '1', ModuleName: '资讯' } , { ModuleId: ' ...
- EXTJS 4.2 资料 控件textfield中fieldLabel去掉冒号,控件label的长度
代码: labelSeparator: '', // 去掉laebl中的冒号 labelWidth: 10,//控件label的长度
- EXTJS 4.2 资料 控件之Grid 那些事
最近在学习Extjs4.2 ,积累文章,看得不错,再此留年: //表格数据最起码有列.数据.转换原始数据这3项 Ext.onReady(function(){ //定义列 var columns = ...
- EXTJS 4.2 资料 控件之Window窗体自动填充页面
1.html页面代码: <div id="component" style="width:100%;height:100%"> <body&g ...
- EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件
columns: [ { header: '序号', xtype: 'rownumberer', align: 'center', width: 100 }, { header: 'CompanyId ...
随机推荐
- CF Spreadsheets (数学)
Spreadsheets time limit per test 10 seconds memory limit per test 64 megabytes input standard input ...
- Eclipse遇到Initializing Java Tooling解决办法
可参考博客:http://liaojuncai.iteye.com/blog/1954113 打开Eclipse的时候莫名其妙的出现这个错误,进度条一直显示这个提示Initializing java ...
- stop()方法的精准应用
stop()方法在动画中扮演了很精彩的角色,他能够阻止连续动画或连续事件出现累积的状况,令动画有条不紊的进行. 1语法结构 stop([clearQueue],[gotoEnd]); 这两个参数都是可 ...
- jQurey对表单表格的操作及更多应用(方法型)
- Jersey(1.19.1) - Building URIs
A very important aspects of REST is hyperlinks, URIs, in representations that clients can use to tra ...
- Ehcache(2.9.x) - API Developer Guide, Blocking and Self Populating Caches
About Blocking and Self-Populating Caches The net.sf.ehcache.constructs package contains some applie ...
- Redis - 排序
SORT 命令格式 SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALP ...
- iOS 之美:iOS Delegate 使用五步曲
在iOS 开发中, 搞清楚Delegate 是需要花些时间的. Delegate 本来是软件架构设计的一种理念.对于像手机这样一个有限的设备,我们需要充分考虑到:内存要尽量省着用: 视图之间的关系要清 ...
- .NET 的webservice例子
因为项目的需要,可能会经常性的需要调用接口,或者写一些接口.现在提供一些简单的例子给大家参考 写接口: [WebServiceBinding(ConformsTo = WsiProfiles.Basi ...
- JAVA解析XML的四种方式
java解析xml文件四种方式 1.介绍 1)DOM(JAXP Crimson解析器) DOM是用与平台和语言无关的方式表示XML文档的官方W3C标准.DOM是以层次结构组织的节点或信息片断的集合.这 ...