lengku1987
 
2013-01-06 22:27:47
 

Sponsored Links
 
easyui datagrid checkbox multiple columns have been done do? it is not possible to do ah.

Sponsored Links
 
xuan0751
2013-01-06 23:07:28
 
multiple columns with checkbox?
jerryflex
2013-01-06 23:28:34
 
ah how 2 have checkbox box how to do?
fine209
2013-01-06 23:56:18
 
{field: 'id', title:'', width: 10, checkbox: true },
{field: 'name1', title: 'name1', width: 10, checkbox: true},
{field: 'name2', title: 'name2' , width: 10, checkbox: true} ...
yangyile1989
2013-01-07 00:25:05
 
this way you can click it? seems not right click on a choice on the other are.
zfh05219
2013-01-07 00:40:55
 
it is you want to achieve cell selected? Then you try to use the field's property editor, type = checkbox
zhangruihu9
2013-01-07 00:58:15
 
I have encountered this problem, it was solved?
wizardzc
2013-01-07 01:17:45
 
+1
ruler2009
2013-01-07 01:42:37
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Complex DataGrid - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css">
<link rel="stylesheet" type="text/css" href="demo.css">
<script type="text/javascript" src="../jquery-1.6.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<script>
$(function(){
$('#test').datagrid({
title:'My DataGrid',
iconCls:'icon-save',
width:700,
height:350,
nowrap: false,
striped: true,
collapsible:true,
url:'datagrid_data.json',
sortName: 'code',
sortOrder: 'desc',
remoteSort: false,
idField:'code',
frozenColumns:[[
                {field:'ck',checkbox:true},
                {title:'code',field:'code',width:80,sortable:true}
]],
columns:[[
        {title:'Base Information',colspan:3},
{field:'opt',title:'Operation',width:100,align:'center', rowspan:2,
formatter:function(value,rec){
return '<span style="color:red">Edit Delete</span>';
}
}
],[
{field:'name',title:'Name',width:120},
{field:'addr',title:'Address',width:220,rowspan:2,sortable:true,
sorter:function(a,b){
return (a>b?1:-1);
}
},
{field:'col4',title:'Col41',width:150,rowspan:2}
]],
pagination:true,
rownumbers:true,
toolbar:[{
id:'btnadd',
text:'Add',
iconCls:'icon-add',
handler:function(){
$('#btnsave').linkbutton('enable');
alert('add')
}
},{
id:'btncut',
text:'Cut',
iconCls:'icon-cut',
handler:function(){
$('#btnsave').linkbutton('enable');
alert('cut')
}
},'-',{
id:'btnsave',
text:'Save',
disabled:true,
iconCls:'icon-save',
handler:function(){
$('#btnsave').linkbutton('disable');
alert('save')
}
}]
});
var p = $('#test').datagrid('getPager');
$(p).pagination({
onBeforeRefresh:function(){
alert('before refresh');
}
});
});
function resize(){
$('#test').datagrid('resize', {
width:700,
height:400
});
}
function getSelected(){
var selected = $('#test').datagrid('getSelected');
if (selected){
alert(selected.code+":"+selected.name+":"+selected.addr+":"+selected.col4);
}
}
function getSelections(){
var ids = [];
var rows = $('#test').datagrid('getSelections');
for(var i=0;i<rows.length;i++){
ids.push(rows[i].code);
}
alert(ids.join(':'));
}
function clearSelections(){
$('#test').datagrid('clearSelections');
}
function selectRow(){
$('#test').datagrid('selectRow',2);
}
function selectRecord(){
$('#test').datagrid('selectRecord','002');
}
function unselectRow(){
$('#test').datagrid('unselectRow',2);
}
function mergeCells(){
$('#test').datagrid('mergeCells',{
index:2,
field:'addr',
rowspan:2,
colspan:2
});
}
</script>
</head>
<body>
<h2>Complex DataGrid</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>Click the button to do actions with datagrid.</div>
</div> <div style="margin:10px 0;">
<a href="#" onclick="getSelected()">GetSelected</a>
<a href="#" onclick="getSelections()">GetSelections</a>
<a href="#" onclick="selectRow()">SelectRow</a>
<a href="#" onclick="selectRecord()">SelectRecord</a>
<a href="#" onclick="unselectRow()">UnselectRow</a>
<a href="#" onclick="clearSelections()">ClearSelections</a>
<a href="#" onclick="resize()">Resize</a>
<a href="#" onclick="mergeCells()">MergeCells</a>
</div> <table id="test"></table> </body>
</html>

can be achieved,

koalas2009
2013-01-07 02:08:38
 
Set the selected row when, checkbox is not checked, the checkbox is selected, it is not selected row, set the following:
checkOnSelect: false,
; selectOnCheck: false,

there is a method that uses formatter generates checkbox, then select the checkbox, when selected will not be associated with the entire line.

wzx870606
2013-01-07 02:25:00
 
function deleteCheckBoxEvent (eventName) {
$ ("# messageBox1"). unbind (eventName);
$ ("# emailBox1"). unbind (eventName);
$ ("# payBox1"). unbind (eventName);
$ ("# all"). unbind (eventName);
}
explained: lift off checkbox The click event. If the read data from the background once again refresh the table and continue to lift.

easyui datagrid checkbox multiple columns have been done do的更多相关文章

  1. jQuery EasyUI DataGrid Checkbox 数据设定与取值

    纯粹做个记录,以免日后忘记该怎么设定. 这一篇将会说明两种使用 jQuery EasyUI DataGrid 的 Checkbox 设定方式,以及在既有数据下将 checked 为 true 的该笔数 ...

  2. EasyUI datagrid checkbox数据设定与取值(转自http://blog.csdn.net/baronyang/article/dnetails/9323463,感谢分享,谢谢)

    这一篇将会说明两种使用 jQuery EasyUI DataGrid 的 Checkbox 设定方式,以及在既有数据下将 checked 为 true 的该笔数据列的 Checkbox 设定为 Che ...

  3. easyui datagrid 动态添加columns属性

    公司在项目设计的时候,有一个需求,就是查出来的表的字段不唯一,一张表的字段可能是三个,也可能是五个,但是却要把它显示到页面,这个给我做ui的带来一点麻烦.因为以前一般用easyui 的datagrid ...

  4. easyui datagrid checkbox的相关属性整理

    DataGrid其中与选择,勾选相关 DataGrid属性: singleSelect boolean 如果为true,则只允许选择一行. false ctrlSelect boolean 在启用多行 ...

  5. easyui datagrid checkbox复选框取消单击选中事件、初始全选全不选等问题解决

    系统业务需要,导入的列表数据默认全部选中,且不可取消选中行.全部店铺优惠券发放过后导入的数据全部清空.如图所示: 一.初始化页面默认全部选中“selectAll”,全部不选中“unselectAll” ...

  6. EasyUI DataGrid Checkbox 多选 获取选中行中的内容

    <table id='grid' class='easyui-datagrid' style='width:950px;height:405px' url='Ajax-index.php?mod ...

  7. easyui datagrid checkbox选中事件

    $('#grid_Order').datagrid({       onCheck: function(index, data) { //alert(data[0]);               / ...

  8. EASYUI DATAGRID 多列复选框CheckBox

    主要实现: 用的 easyui 1.3.2 实现多个复选框列,各列互不影响.能够实现全选.主要部门用红色标记了的. easyui datagrid 初始化: <script> functi ...

  9. easyui datagrid editor checkbox 单击事件

    Easyui datagrid treegrid中能够为行追加checkbox元素.比如: $('#tt').treegrid({ url:'get_data.php', idField:'id', ...

随机推荐

  1. [Vuejs+php] MySQL数据转JSON传值到前端

    说在前面 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. 优点如下[转]: 1.占带宽小(格式是压缩的) 2. js通过eval()进行Json读取(便 ...

  2. TeX Live & TeXstudio 安装手记

    数据库课上又看到了那位用 beamer 做 slides 的师兄,想到自己一拖再拖的LaTeX入门,决定赶快动手装个环境再说~在经过一番搜索和研究之后决定先在 windows 底下试用,选择 TeX ...

  3. Visual Studio 中如何同时注释多行和取消注释多行

    注释多行:先按 Ctrl - K 组合键,再按 Ctrl - C 组合键 取消注释多行:先按 Ctrl - K 组合键,再按 Ctrl - U 组合键

  4. [实战]MVC5+EF6+MySql企业网盘实战(26)——音乐列表

    写在前面 本篇文章将实现,音乐列表,同样和其他列表的不同之处,在于查询条件的不同. 系列文章 [EF]vs15+ef6+mysql code first方式 [实战]MVC5+EF6+MySql企业网 ...

  5. js红包算法【转载】

    源文地址:https://juejin.im/post/5ae413946fb9a07a9c03f7f7 <!DOCTYPE html> <html lang="en&qu ...

  6. 使用 Java 查找字符串中出现次数最多的字符以及出现的次数?

    使用 Java 查找字符串中出现次数最多的字符以及出现的次数? import java.util.HashMap; import java.util.Map; public class TestStr ...

  7. vim常见操作命令

    打开多文件vim file1 file2:open/:e 不关闭vim打开文件 分帧窗口:new 新窗口:sp 横向:vsp 纵向ctrl+w窗口切换:tabc 关闭当前窗口:tabo 关闭所有窗口: ...

  8. 【洛谷比赛】[LnOI2019]长脖子鹿省选模拟赛 T1 题解

    今天是[LnOI2019]长脖子鹿省选模拟赛的时间,小编表示考的不怎么样,改了半天也只会改第一题,那也先呈上题解吧. T1:P5248 [LnOI2019SP]快速多项式变换(FPT) 一看这题就很手 ...

  9. 理解裸机部署过程ironic

    部署物理机跟部署虚拟机的概念在nova来看是一样,都是nova通过创建虚拟机的方式来触发,只是底层nova-scheduler和nova-compute的驱动不一样.虚拟机的底层驱动采用的libvir ...

  10. 「SCOI2014」方伯伯的商场之旅

    「SCOI2014」方伯伯的商场之旅 题目描述 方伯伯有一天去参加一个商场举办的游戏.商场派了一些工作人员排成一行.每个人面前有几堆石子.说来也巧,位置在 \(i\) 的人面前的第 \(j\) 堆的石 ...