用jquery判断datagrid中checkbox是否被选中的有关问题

问题描述

用jquery判断datagrid中checkbox是否被选中的有关问题
$(function(){
$('#pro_manage_show_grid').datagrid({
title:'标准任务执行查询'
iconCls:'icon-ok'
nowrap: true
autoRowHeight: true
striped: true
collapsible:true
method: 'post'
url:path+'/monitor/f1/queryTasklogAll.do'
sortName: ''
sortOrder: 'asc'
idField:'id'
pageSize:20
pageList:[2050100]
loadMsg:'请稍候,努力加载中...'
singleSelect:true
fitColumns:true
fit:true
columns:[[
{field:'ID'title:'ID'width:100checkbox:trueresizable:false}
{field:'bizBeginDate'title:'业务开始日期'width:100sortable:trueresizable:true}
{field:'bizEndDate'title:'业务结束日期'width:100sortable:trueresizable:true}
{field:'taskCode'title:'任务编码'width:100resizable:true}
{field:'taskStatus'title:'任务状态'width:100resizable:true}
{field:'taskName'title:'任务中文名'width:100resizable:true}
{field:'beginDt'title:'执行开始时间'width:100resizable:true}
{field:'endDt'title:'执行结束时间'width:100resizable:true}
{field:'workFlowRunId'title:'工作流ID'width:100resizable:true}
]]
pagination:true
rownumbers:true
collapsible:false
remoteSort:false
tools:'#pro_manage_list_tools'
//loadFilter:pagerFilter
loader:dataLoader

    });    //给状态为-1的价位红色    $('#pro_manage_show_grid').datagrid({        rowStyler:function(indexrow){             if(row.taskStatus==-1){                  return 'background-color:red;';             }                    }    });    //$('#pro_manage_show_grid').datagrid('loadData' getData());    var p = $('#pro_manage_show_grid').datagrid('getPager');     if (p){     $(p).pagination({         onBeforeRefresh:function(){         alert('before refresh');         }     });     }   

});

//自适应$(window).resize(function(){    $(""#pro_manage_list"").layout('resize');     }); //此界面,设置成定时刷新界面。每两分钟刷新一次function myrefresh(){        window.location.reload(); } setTimeout('myrefresh()'1000*60*2); //每两分钟刷新一次function query(){    //Please wait...    $.blockUI({css: {     border: 'none'     padding: '15px'     backgroundColor: '#000'     '-webkit-border-radius': '10px'     '-moz-border-radius': '10px'     opacity: .5     color: '#fff'}});    //    $.ajax({        url:path+'/monitor/f1/queryTasklogList.do'        type: 'POST'        dataType: 'json'        data: $(""#dataForm"").serialize()        success: function(msg){            var posData = eval(msg);            $('#pro_manage_show_grid').datagrid('loadData'posData);            $.unblockUI();        }       error: function(msg){                $.unblockUI();                alert(""操作失败!"");        }    });}function querylog(){    var row = $('#pro_manage_show_grid').datagrid('getSelected');    var _url = path+'/monitor/f2/queryLog.do?workFlowId='+ row.workFlowRunId;    window.parent.initCenter(""日志信息""_urlbb""true);} 

在按钮事件激发querylog()中如何判断checkbox是否选中

解决方案

 if($(""#id"").attr(""checked"")==true)
时间: 2024-09-03 05:40:26

用jquery判断datagrid中checkbox是否被选中的有关问题的相关文章

jquery判断字符串中是否存在某个的字符串

  用jquery判断字符串中是否存在某个的字符串的实现代码 $(function(){ var str="sunny,woo"; var sear=new RegExp(','); if(sear.test(str)) { alert('Yes'); } var tag=','; if(str.indexOf(tag)!=-1) { alert('Yes'); } });

jQuery判断iframe中元素是否存在的方法

  jQuery判断iframe中元素是否存在的方法比较简单只要判断框架window.frames["iframepage"]指定值是不是存在就可以了,下面整理了一些例子大家可进入参考. 例子  代码如下   if($(window.frames["iframepage"].document).find('.l-grid-row-cell').length > 0){ alert(1); }else{ alert(2); } 以上代码,判断id为iframep

如何用jquery 将 datagrid中数据导出到excel?

问题描述 如何用jquery 将 datagrid中数据导出到excel? 需要用到些什么插件?有例子更好 谢谢 解决方案 一个插件,将jquery数据生成excel的xml内容的字符串.下面是插件代码 <script> /** Jquery easyui datagrid js导出excel 修改自extgrid导出excel * allows for downloading of grid data (store) directly into excel * Method: extract

在C# winform中如何获取 datagrid的checkbox列的选中事件

问题描述 在C#winform中如何获取datagrid的checkbox列的选中事件.先谢谢了! 解决方案 解决方案二:如果使用DataGridView,俺的方法是捕获CellContentClick事件解决方案三:能否说的再详细一点吗?谢谢了

datagrid中CheckBox的问题

问题描述 datagrid中CheckBox的问题我用如下代码实现了在datagrid中插入CheckBox的功能,但是,当我想选择datagrid里的一个CheckBox时,非要先选择哪个CheckBox所在的cell,然后才能选中CheckBox:还有,我想取消一个CheckBox,也遇到像以上一样的问题.我想知道怎们样才能不像以上那样麻烦地选择datagrid中的一个CheckBox.请高手指教! 解决方案 解决方案二:不知,帮顶

jquery判断复选框是否被选中的方法_jquery

jquery 判断复选框是否选中以及如何选中的问题做一下总结. 进入正题,还是当页面有如下一组复选框的时候: <input type="checkbox" name="fruit" value="apple" />苹果 <input type="checkbox" name="fruit" value="orange" />橘子 <input type=&q

关于datagrid模板列中checkbox表头是否选中的问题!在线等!

问题描述 我现在在datagrid模板列中表头列里的checkbox中事件写的是:foreach(DataGridItemdginDataGrid1.Items){CheckBoxc1=(CheckBox)dg.Cells[6].FindControl("ch1");if(c1.Checked==false){c1.Checked=true;}else{c1.Checked=false;}}但是发现了一个问题,如果列表中有部分checkbox控件选择上了,有的没选择上,这个时候单击表头

DataGrid中CheckBox绑定bool属性来进行选中判断

代码 <CheckBox x:Name="chkAccountSelected" IsChecked="{Binding 属性名, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></CheckBox>

帮帮我呀。我卡在这个好半天了,datagrid中checkbox读取数据

问题描述 看过好多个相关的帖子,就是不行啊,请大家帮帮我,我做的是一个发邮件的模块,想在收件人地址那用checkbox来选择,确定后就直接插入到地址栏,代码如下:(我用的是C#)privatevoidButton3_Click(objectsender,System.EventArgse){foreach(DataGridItemdtindgdizhibo.Items)//dgdizhibo是datagrid名字,是用来显示联系人的{CheckBoxch=(CheckBox)dt.FindCon