最近在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 的用法的更多相关文章

  1. EXTJS 4.2 资料 控件之checkboxgroup的用法(动态数据)

    在开发中遇到两种情况:第一在新增窗体时,要动态加载CheckBox项:第二在修改时不但需要加载所有CheckBox项,还要并且选中之前新增时的选项 如图这是在修改页面的效果: 1.在新增窗体中动态加载 ...

  2. EXTJS 4.2 资料 控件之checkboxgroup的用法(静态数据)

    1.页面 1.1点击‘横幅’,需要动态显示隐藏文本框 { xtype: 'fieldset', title: '指定附加图&横幅设置', collapsible: true, items: [ ...

  3. EXTJS 3.0 资料 控件之 html 潜入label用法

    这是在Extjs 中插入html 控件label! html: "<div><label id='howMany'>您共选中了</label><br ...

  4. EXTJS 3.0 资料 控件之 combo 用法

    EXTJS combo 控件: 1.先定义store //年款 var comboData_ReleasYear = [ ['], ['], ['], ['] ]; 2.定义combo控件 { lay ...

  5. EXTJS 4.2 资料 控件之combo 联动

    写两个数据源: 1.IM_ST_Module.js { success:true, data:[ { ModuleId: '1', ModuleName: '资讯' } , { ModuleId: ' ...

  6. EXTJS 4.2 资料 控件textfield中fieldLabel去掉冒号,控件label的长度

    代码: labelSeparator: '', // 去掉laebl中的冒号 labelWidth: 10,//控件label的长度

  7. EXTJS 4.2 资料 控件之Grid 那些事

    最近在学习Extjs4.2 ,积累文章,看得不错,再此留年: //表格数据最起码有列.数据.转换原始数据这3项 Ext.onReady(function(){ //定义列 var columns = ...

  8. EXTJS 4.2 资料 控件之Window窗体自动填充页面

    1.html页面代码: <div id="component" style="width:100%;height:100%"> <body&g ...

  9. EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件

    columns: [ { header: '序号', xtype: 'rownumberer', align: 'center', width: 100 }, { header: 'CompanyId ...

随机推荐

  1. 【数论,思路】HDU-5288;多校#1-1001

    2015 Multi-University Training Contest 1  1001 /* Problem: HDU-5288,多校#1 1001 Tips: 数学.思路 Date: 2015 ...

  2. Groovy选型

    Groovy是一门基于JVM的动态语言,同时也是一门面向对象的语言,语法上和Java非常相似.它结合了Python.Ruby和Smalltalk的许多强大的特性,Groovy 代码能够与 Java 代 ...

  3. 引用web service时,出现无法识别的配置节点applicationSettings

    ApplicationSetting 节点的内容: <applicationSettings> <MyWeb.Properties.Settings> <setting ...

  4. display:none与visible:hidden区别

    if(list.style.display=='none'){                 list.style.display='block';             }else{       ...

  5. Commons IO - IOUtils

    IOUtils is a general IO stream manipulation utilities. This class provides static utility methods fo ...

  6. Android--简单的三级菜单

      关于这个菜单应该在很多播放器应用里面可以看见,直接先上两张效果图吧,一张是该Demo的效果图,一张是优酷手机客户端的效果图.                                     ...

  7. 关于蓝牙设备与ios连接后,自动打开一个app

    How to launch an iphone app when an external accessory is either paired over BT or plugged into dock ...

  8. CSS之颜色英文代码全集

    ColorHex在线颜色查询 <head> <title>CSS之颜色英文代码全集</title> <style type="text/css&qu ...

  9. 省市数据递归加载到TreeView

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  10. Objective-C 【动态类型检测&响应方法】

    ------------------------------------------- 动态类型检测 代码: #import <Foundation/Foundation.h> @inte ...