easyui datagrid 单选框 效果
field: 'oid',
title: '选择',
width: 20,
formatter: function(value, rowData, rowIndex){
return '<input type="radio" name="selectRadio" id="selectRadio"' + rowIndex + ' value="' + rowData.oid + '" />';
}
}
onLoadSuccess: function(data){
//加载完毕后获取所有的checkbox遍历
if (data.rows.length > 0) {
//循环判断操作为新增的不能选择
for (var i = 0; i < data.rows.length; i++) {
//根据operate让某些行不可选
if (data.rows[i].operate == "false") {
$("input[type='radio']")[i].disabled = true;
}
}
}
},
onClickRow: function(rowIndex, rowData){
//加载完毕后获取所有的checkbox遍历
var radio = $("input[type='radio']")[rowIndex].disabled;
//如果当前的单选框不可选,则不让其选中
if (radio!= true) {
//让点击的行单选按钮选中
$("input[type='radio']")[rowIndex].checked = true;
}
else {
$("input[type='radio']")[rowIndex].checked = false;
}
}
easyui datagrid 单选框 效果的更多相关文章
- EasyUi datagrid 单选框选中事件
Easyui datagrid中的单选框默认是这样定义的 columns: [[ { field: 'CK', title: '', checkbox: true, width: 30 }]]. 平常 ...
- EasyUI DataGrid单选如何取消选中
EasyUI DataGrid在多选时,选中某行,可以取消:而在单选时,并不能取消选中某一行. 可以通过修改源码来完成. 在其源码中找到 opts.singleSelect==true 将代码做如下修 ...
- easyui datagrid 选中行效果
转:http://blog.csdn.net/hzw2312/article/details/27534065 jquery easyui datagrid 获取Checked选择行(勾选行)数据 g ...
- layui radio 单选框 效果 显示不来 解决方法
$("input[name=sex][value=女]").attr("checked", data.data.adminInfoEntity.adminInf ...
- (六)c#Winform自定义控件-单选框
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...
- easyui datagrid复选框控制单选
使用easyui datagrid的时候,由于对数据表格操作太多,并且有单选和多选功能因此采用复选框.但是在单选的状态,使用CheckOnSelect和singleselect时发现,页面有明显延迟, ...
- EasyUI效果--DataGrid的编辑效果
DataGrid的编辑效果是我目前使用的easyUI的第三个效果,相对于前两个,这个算是比较复杂点了. 运行起来的效果,大概就是这样,任意点击某行,然后该行变为可以编辑的,失去焦点之后,该行恢复 ...
- EASYUI DATAGRID 多列复选框CheckBox
主要实现: 用的 easyui 1.3.2 实现多个复选框列,各列互不影响.能够实现全选.主要部门用红色标记了的. easyui datagrid 初始化: <script> functi ...
- JS实现单选按钮回显时页面效果出现,但选中单选框的值为空
最近做了很多前端页面的工作,遇到的一个感觉很头疼的问题在这里记一下: 经常用JS回显单选框,但是明明从页面效果上来看,单选框已经被选中了,可是却不能触发单选框的change事件,取值的时候用某种方法取 ...
随机推荐
- 关于oracle ORA-28001的解决方法
今天发现客户的机器上的系统登录不上了,并且提示如下情况: 发现原来Oracle11G的新特性所致, Oracle11G创建用户时缺省密码过期限制是180天(即6个月), 如果超过180天用户密码未做修 ...
- 软件打开时间、窗体透明度、背景色---《用delphi开发共享软件》-15.1任务管理器
1.计算软件启动了多长时间:用定时器,每分钟触发一次: procedure TFrmMain.tmCheckLegalTimer(Sender: TObject);Var Minutes:LongIn ...
- wpf,ListBox,ScrollViewer内容向左向右偏移指定位置
public partial class Example : UserControl { private ScrollViewer myScrollViewer; public Example() { ...
- three.js 场景入门
<!DOCTYPE html> <html> <head> <title>Example 01.02 - First Scene</title&g ...
- 关于fragment保存变量的问题
之前遇到一个问题:某个fragment在打开改变状态好后,然后关闭,要求是再次打开时该状态依然保留 这时候求度娘.自己解决问题后,现在整理过程如下: 1.新定义Bundle saveState=new ...
- angularjs指令(一)
前面通过视频学习了解了指令的概念,这里学习一下指令中的作用域的相关内容. 通过独立作用域的不同绑定,可以实现更具适应性的自定义标签.借由不同的绑定规则绑定属性,从而定义出符合更多应用场景的标签. 本篇 ...
- 【Infomatica】Infomatica PowerCenter 9.1.0配置Repository Service和Integration Service小结
2014-05-14 今天在虚拟机中尝试安装Infomatica PowerCenter 9.1.0. 安装环境:Windows Server 2003 32bit. 字符集环境 DBMS:Oracl ...
- [Leetcode] Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = ...
- [Leetcode] Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...
- [iOS-UI]给输入框添加清除按钮的代码
UIButton *clearButton = [self.textField valueForKey:@"_clearButton"]; [clearButton setImag ...