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 A and B and Chess
A and B and Chess time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- css3 web字体记
css3 web字体 @font-face语法 @font-face能够加载服务器端的字体,让客户端浏览器显示客户端没有安装的字体. @font-face{ font-family:<YourW ...
- html5之meta标签viewport应用
在html5移动页面中,viewport定义必不可少. 首先了解下关于viewport的概念: 先了解移动设备的屏幕尺寸和设备尺寸: iPhone3 设备尺寸 320*480 ; 屏幕尺寸 320* ...
- New MVC World
Note: /Controllers:controllers respond to input from the browser,decide what to do with it,and retur ...
- 在c#中使用log4net
1.从log4net官网下载最新的log4net.dll 2.设置配置文件在app.config <?xml version="1.0"?> <configura ...
- 和阿文一起学H5--如何把H5压缩到最小
三种压缩图片的方法: 1.PS 但是PS每次只能压缩一张,下面介绍第二个神器 2.TinyPng压缩 https://tinypng.com/ 3.IloveIMG压缩 http://www.ilov ...
- Session id实现通过Cookie来传输方法及代码参考
1. Web中的Session指的就是用户在浏览某个网站时,从进入网站到浏览器关闭所经过的这段时间,也就是用户浏览这个网站所花费的时间.因此从上述的定义中我们可以看到,Session实际上是一个特定的 ...
- js中小数的操作及数字类型的验证
1.丢弃小数部分,保留整数部分js:parseInt(7/2) 2.向上取整,有小数就整数部分加1js: Math.ceil(7/2) 3,四舍五入. js: Math.round(7/2) 4,向下 ...
- jQuery动态添加元素并绑定事件
写网页的时候常常需要根据实际情况添加新的元素,然后这些新元素还需要绑定已有的事件,如:有一ul,点击其中某 li,根据其 id 或 value 等获取新的数据列表,并新建 ul 显示,新 ul 中的 ...
- 多进程之间的互斥信号量实现(Linux和windows跨平台)
多线程之间实现互斥操作方式很多种,临界区(Critical Section),互斥量(Mutex),信号量(Semaphore),事件(Event)等方式 其中临界区,互斥量,信号量算是严格意义的实现 ...