是否可以隐藏或操纵jqGrid“排序”?图标? [英] Is it possible to hide or manipulate the jqGrid "sort" icons?

查看:693
本文介绍了是否可以隐藏或操纵jqGrid“排序”?图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过onSortCol事件将自定义的多列排序附加到我的jqGrid实例:

I have a custom, multi-column sort attached to my jqGrid instance by means of the onSortCol event:

onSortCol: function(index, iCol, sortorder) {
    //Manipulate the sort order via custom code, and store it in postData.

    return 'stop';
}

我遇到的问题是列标题中的排序图标与实际的排序不同步,因为它们的行为与我想要实现的行为略有不同。

The problem I'm running into is that the sort icons in the column headers are falling out of synch with the actual sorting, because their behavior is slightly different from what I'm trying to implement.

我尝试过使用 setParam('sortname'...),但具体不会更改排序图标。我也尝试过 sortGrid ,但这会以一种似乎与用户点击无法区分的方式引发onSortCol事件。

I've tried using setParam('sortname'...), but that specifically doesn't change the sort icon. I've also tried sortGrid, but that raises the onSortCol event in a way that seems to be indistinguishable from a user's click.

如果通过CSS隐藏是唯一的选择,那么最有效的选择器只能定位特定网格中的排序标题吗?

If hiding via CSS is the only option, what's the most effective selector to target ONLY the sort headers in a specific grid?

推荐答案

我目前正在使用以下CSS:

I am currently using the following CSS:

#gbox_MyGrid .s-ico span {
    display:none;
}

对于ID为 MyGrid的网格

这篇关于是否可以隐藏或操纵jqGrid“排序”?图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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