要修复一些列 [英] Want to fix some columns

查看:81
本文介绍了要修复一些列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想修复一些列,以使用户不能拖放这些列,也不能重新排列这些列.我该怎么做?

I want to fix some columns so that user cannot drag and drop these columns and cannot reorder these columns also.Is it doable how can i do it.

推荐答案

grid.jqueryui.js 使用 jQuery UI Sortable Interaction 启用拖放列.

以下选择器确定可以拖放的列:

The following selector determines which columns can be dragged-and-dropped:

"items": '>th:not(:has(#jqgh_'+tid+'_cb'+',#jqgh_'+tid+'_rn'+',#jqgh_'+tid+'_subgrid),:hidden)',

因此,基本上,选择器将选择任何未隐藏且不满足以下条件之一的列标题:

So basically the selector will choose any column header that is not hidden and does not satisfy one of the following criteria:

  • #jqgh_'+tid+'_cb'-复选框列(用于多选)
  • #jqgh_'+tid+'_rn'-行号列(用于主键?)
  • #jqgh_'+tid+'_subgrid-子网格列
  • #jqgh_'+tid+'_cb' - A checkbox column (for multi-select)
  • #jqgh_'+tid+'_rn' - A row number column (for primary key?)
  • #jqgh_'+tid+'_subgrid - A subgrid column

为满足您的要求,必须修改jqGrid以便用黑名单中的列填充items选择器.也许可以使用新的colmodel选项标记列入黑名单的列.这都是可行的,但需要更改jqGrid本身...

To satisfy your request, jqGrid would have to be modified to populate the items selector with blacklisted columns. Maybe the blacklisted columns could be flagged using a new colmodel option. This is all do-able, but requires changes to jqGrid itself...

这篇关于要修复一些列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆