找回密码
 立即注册

QQ登录

只需一步,快速开始

xiezhehao

注册会员

4

主题

7

帖子

144

积分

注册会员

积分
144
最新发帖
xiezhehao
注册会员   /  发表于:2018-9-10 02:30  /   查看:3150  /  回复:3
webform 中的c1gridview  使用wijimo 3 文档中的操作类方法无效

$("#C1GridView1").c1gridview("columns")[1].option("Visible", "False");

或者有什么其他办法前台操作列隐藏吗?

3 个回复

倒序浏览
JeffryLI
葡萄城公司职员   /  发表于:2018-9-10 16:08:55
沙发
您好,可以参照
  1.    // create checkboxes to toggle column visibility
  2.                 var columns = grid.wijgrid("option", "columns");
  3.                 var listContainer = $("#checkboxes");
  4.                 $.each(columns, function (index, col) {
  5.                     var isChecked = col.visible ? "checked = 'checked'" : "";
  6.                     var checkBox = $("<label><input type='checkbox' " + isChecked + " />" + col.headerText + "</label>");
  7.                     listContainer.append(checkBox);
  8.                     checkBox.click(function (e) {
  9.                         columns[index].visible = $(this).children("input")[0].checked;
  10.                         grid.wijgrid("doRefresh");
  11.                     })
  12.                 })
  13.             });
复制代码
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
xiezhehao
注册会员   /  发表于:2018-9-10 17:35:07
板凳
感谢,明白了
回复 使用道具 举报
JeffryLI
葡萄城公司职员   /  发表于:2018-9-10 18:21:06
地板
不客气的。
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部