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 ...
随机推荐
- java+mysql实现保存图片到数据库,以及读取数据库存储的图片
一:建表 二:获取数据库连接 1:导入mysql的驱动jar包,mysql-connector-java-5.1.8-bin.jar 2:写代码连接数据库,如下: /** * */ package c ...
- LeetCode 345
Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels ...
- jQuery之对话框
<!doctype html> <html> <head> <meta charset="utf-8"> <meta http ...
- 省市数据递归加载到TreeView
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- OC7_目录操作
// // main.m // OC7_目录操作 // // Created by zhangxueming on 15/6/19. // Copyright (c) 2015年 zhangxuemi ...
- 第一个MapReduce程序
计算文件中每个单词的频数 wordcount 程序调用 wordmap 和 wordreduce 程序. import org.apache.hadoop.conf.Configuration; im ...
- 关于内存的5个函数(malloc,VirtualAlloc,GlobalAlloc,LocalAlloc,HeapAlloc)
VirtualAlloc 该函数的功能是在调用进程的虚地址空间,预定或者提交一部分页,如果用于内存分配的话,并且分配类型未指定MEM_RESET,则系统将自动设置为0 一次分配 1PAGE 以上的 R ...
- memset与NULL区别
memset与NULL区别 NULL与0 的区别 为什么强调一个malloc对应一个free 在一个结构体malloc,然后free,但是她的成员变量的malloc并没有free,还需要特别的free ...
- NTT研发
2.研发标准 stead---大型机 css terasolunt---反向自动生成设计书 3.开发阶段做好设计,确定需求,测试阶段只是做产品有多差或者完成了多少需求,不是用来提高产品质量的过程
- 选择问题(选出第i个最小元素)
通过分治法解决的分析(还有其他方法解决选择问题如使用 堆) 1 同快速排序一样,对输入的数组进行递归分解 不同的是:快速排序会递归处理分解的两边,而选择问题只处理需要的一边 2 选择问题的期望时间代价 ...