怎么为jqgrid中的多选checkbox列定制bootstrap样式

圣殿骑士18 2018-10-28 07:51:52
在改造jqgrid中的checkbox时出现了一些难题。
标题中的checkbox已经改造好,改造的方法采用这个链接的方法,就是用一个div将checkbox包起来,再设置一些样式:
https://www.cnblogs.com/czaiz/p/8288314.html
效果是:


然后,图中也可以看到,列表中的checkbox并没有新的样式,想设置新的样式,但一直没有办法,现在只是简单的设置了zoom。
为什么不能如标题一样来处理,是因为jqgrid产生的html格式无法介入,不能做到在外面包一层div,因为它自动生成的效果是这样:

我现在只能简单设置zoom:
td .cbox {margin-left:4px!important;margin-top:4px!important;zoom:130%;}


我考虑过用jqgrid定义中设置列的formatter,对于用户定义的列的是可以的,比如:
{ label: '员工号', name: 'UserNo', width: 60, align: 'left' },
{
label: '允许登录', name: 'AllowLogin', width: 60, align: 'left',
formatter: function (cellvalue, options, rowObject) {
if (cellvalue == 1) {
return '<span class=\"label label-success\">' + $.getEnumItemText("EnumAllowLogin", cellvalue) + '</span>';
} else if (cellvalue == 0) {
return '<span class=\"label label-default\">' + $.getEnumItemText("EnumAllowLogin", cellvalue) + '</span>';
}
}
},

但多选列是配置出来的,怎么override?没有找到办法。

有办法来解决这个问题吗?
...全文
661 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
圣殿骑士18 2018-10-29
  • 打赏
  • 举报
回复
没有人碰到过吗,顶
包括源代码、数据库文档、数据库创建SQL脚本。一套基于ASP.NET MVC+EF6+Bootstrap开发出来的框架源代码! 采用主流框架,容易上手,简单易学,学习成本低。可完全实现二次开发、基本满足80%项目需求。 可以帮助解决.NET项目70%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。 支持SQLServer、MySQL、Oracle、SQLite、Access 等多数据库类型。模块化设计,层次结构清晰。内置一系企业信息管理的基础功能。 操作权限控制精密细致,对所有管理链接都进行权限验证,可控制到导航菜单、功能按钮。 数据权限(精细化数据权限控制,控制到行级,表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段 兼容目前最流行浏览器(IE8+、Chrome、Firefox、360浏览器) 1、前端技术 JS框架:Bootstrap、JQuery CSS框架:Bootstrap v3.3.4(稳定是后台,UI方面根据需求自己升级改造吧)。 客户端验证:jQuery Validation Plugin。 在线编辑器:ckeditor、simditor 上传文件:Uploadify 数据表格:jqGridBootstrap Talbe 对话框:layer 页面布局:jquery.layout.js 图表插件:echarts、highcharts 2、后端技术 核心框架:ASP.NET MVC5、WEB API 持久层框架:EntityFramework 定时计划任务:Quartz.Net组件 安全支持:过滤器、Sql注入、请求伪造 服务端验证:实体模型验证、自己封装Validator 缓存框架:微软自带Cache、Redis 日志管理:Log4net、登录日志、操作日志 工具类:NPOI、Newtonsoft.Json、验证码
The initial release (v1) comes with the following features: 4 Different theme colors Responsive design Documentation HTML pages including: Dashboard with stats, charts and recent events UI elements Buttons Treeview Form elements Wysiwyg editor Wizard Customizable widgets Image gallery Pricing tables Invoice Inbox Timeline FAQ User profile Login, register and forgot password Error 404 and error 500 pages And a few other Custom elements and plugins including: Pure CSS3 checkbox, radio and On/Off switch elements (not available in IE8) File input control Simple color picker Custom scrollbars Onpage help to provide better help for users Bootstrap, jQuery UI and third party plugins and elements including: jQuery jQuery UI (Custom Build) Twitter Bootstrap FontAwesome Google "Open Sans" Font jQuery Flot Charts jQuery Sparklines Easy Pie Chart jQuery Knob jQuery Validate FuelUX (Spinner & Wizard & Treeview) FullCalendar jQuery ColorBox jQuery dataTables jQuery Chosen jQuery Masked Input jQuery Input Limiter jQuery AutoSize Bootstrap Colorpicker Bootstrap Datepicker Bootstrap Timepicker Bootstrap DateRange Picker Bootstrap Date-Time Picker Bootbox.js jQuery Gritter jQuery slimScroll Spin.js jQuery UI Touch Punch Google Code Prettify ExplorerCanvas Mindmup Wysiwyg Editor Toopay Markdown Editor X-editable Select2 Bootstrap Tags jQuery Mobile (Custom Build) jqGrid Dropzone.js Nestable lists plugin typeahead.js Dual listbox Multiselect jQuery raty The following is on to-do list and will be added to Ace in next updates: New features & elements such as : Wysiwyg editor (now available) Treeview (now available) Timeline (now available) Search results Tables with details FAQ page (now available) User profile (now available) Inline editable data (now available) File upload and management Email template (now available) Inbox & messages (now available) Misc. page templates Cookie support for saving client-side customizations (now available) RTL Support (now available) Adding LESS files as well as Javascript client-side template files such as Mustache. (now available) Please note that support is provided via email as mentioned in the documentation page.

61,129

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧