js datagrid 怎么实现checkbox多选_html/css_WEB-ITnose
$('#test').datagrid({ title:'主表', width:970, height:325, nowrap: false, striped: true, collapsible:true, url:'datatest.php', sortName: 'num', remoteSort: false, singleSelect: true, //frozenColumns:[[{field:'ck',checkbox:true}]], queryParams:{isaddhead:function(){return isaddhead}, hid:function(){return hid}}, columns:[[ {field:'num',title:'编号',width:30}, {field:'materialcode',title:'物料编码',width:120}, {field:'com',title:'单位',width:60}, {field:'quantity',title:'数量',width:40,rowspan:2}, {field:'name',title:'详细名称',width:350,rowspan:2}, {field:'date',title:'要求交货期',width:70,rowspan:2}, {field:'other',title:'其他要求',width:180,rowspan:2}, {field:'app',title:'状态',width:80,rowspan:1}, {field:'state',title:'x',width:1,rowspan:1}, {field:'rfqno',title:'x',width:1,rowspan:1} ]], pagination:true, rownumbers:true, toolbar:[{ id:'btnadd', text:'添加', iconCls:'icon-add', handler:function(){ if(isaddhead == 1 && !iscontrl && ismain==0 ) { iscontrl = true; maindivreplace(1, null); } } },{ id:'btndel', text:'删除', iconCls:'icon-remove', handler:function(){ if(isaddhead == 1 && isselmain == 1 && !iscontrl && ismain==0) { $.post( "MainDataoper.php", {mainid:mainNum, requetype:"del",rfq_No:$('#prfqno').val(),formId:$('#formidold').val()},function(data) { isselmain =0;//重新加载前把状态改为主表没被选中 isselqu = 0;//重新加载前把状态改为明细表没被选中 $('#test').datagrid("reload");//datagrad重新加载 $("#test2").datagrid('loadData',{total:0,rows:[]}); }); } } },{ id:'btnedit', text:'修改', iconCls:'icon-edit', handler:function(){ if(isaddhead == 1 && !iscontrl && isselmain ==1 && ismain==0) { iscontrl = true; isselmain = 0; isselqu= 0; var rowdata = $("#test").datagrid('getSelected'); maindivreplace(2, rowdata);//打开主表编辑div, } } }],
请么实现多选
用frozenColumns:[[{field:'ck',checkbox:true}]] datagrid中有选项,但不能复选.
请问怎么实现?
回复讨论(解决方案)
singleSelect:false,
datagrid 属性
singleSelect:false,
datagrid 属性 +1
singleSelect : false,

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.
