Is it possible to hide or manipulate the jqGrid quot;sortquot; icons?(是否可以隐藏或操作 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
的网格.
For a grid with an ID of MyGrid
.
这篇关于是否可以隐藏或操作 jqGrid“排序"?图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否可以隐藏或操作 jqGrid“排序"?图标?


基础教程推荐
- 每次设置弹出窗口的焦点 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01