在带有subGrid的可工作的jqGrid中,我如何隐藏完全显示加号/减号/打开图标的列? [英] In a working jqGrid with subGrid how I can hide the column where appears the plus/minus/open icons completely?

查看:416
本文介绍了在带有subGrid的可工作的jqGrid中,我如何隐藏完全显示加号/减号/打开图标的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也想将其完全隐藏在主网格中.

I want hide it completely from the main grid too.

查看图片以获得更多说明.

See image for more clarification.

预先感谢.

推荐答案

您需要隐藏的列的名称为"subgrid".要隐藏它,您可以使用

The column which you need to hide has the name "subgrid". So to hide it you can use

$("#grid").jqGrid("hideCol", "subgrid");

如果您需要实现用于打开或关闭子网格的接口,则可以调用

If you need to implement interface for opening or closing subgrids you can call toggleSubGridRow method directly. For example the following callback will toggle subgrid on double-click on the main row:

ondblClickRow: function (rowid) {
    $(this).jqGrid("toggleSubGridRow", rowid);
}

此处:

已更新:如果要在子网格的第一列中另外隐藏图标,可以使用选项

UPDATED: If you want to hide additionally the icon from the first column of subgrid you can use the option

subGridOptions: { openicon: "ui-helper-hidden" }

并添加其他CSS样式

.subgrid-cell .ui-helper-hidden { display: none}

请参见更新的演示:

更新2 :要隐藏子网格行中带有图标的列,您可以使用

UPDATED 2: To hide the column with the icon in the subgrid row you can just use

.subgrid-cell { display: none}

请参见下一个演示:

这篇关于在带有subGrid的可工作的jqGrid中,我如何隐藏完全显示加号/减号/打开图标的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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