如何使排序图标在jqgrid的所有列标题中可见,而与排序状态无关 [英] how to make sort icons visible in all column headers in jqgrid regardless on sort status

查看:92
本文介绍了如何使排序图标在jqgrid的所有列标题中可见,而与排序状态无关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jqGrid列仅在对列进行排序时显示排序图标.

jqGrid column shows sort icons only if column is sorted.

如何使排序图标在所有列中可见,以便用户有主意 单击列标题即可执行该排序? 可能两个排序方向三角形都必须处于非活动状态.

How to make sort icons to visible in all columns so that user has idea that sort can be performed clicking in column header? Probably both sort direction triangles must be in inactive.

Telerik radgrid有这个:

Telerik radgrid has this:

http://www.telerik.com/community/forums/aspnet/grid/possible-to-show-sort-icon-regardless-sort-status.aspx

如何在jqGrid中实现呢? 当前没有任何迹象表明列可以排序.

How to implement this in jqGrid ? Currently there are no any indicaton that columns are sortable.

更新

我使用下面的colmodel尝试了答案的解决方案.

I tried solution from answer using colmodel below.

问题:

  1. 对于窄和列排序图标不会显示或部分显示. 列标题的右侧有很大的空白空间.如何减少此空白空间,以便列标题文本和排序图标可以出现在该区域?

  1. For narrow and columns sort icons are not displayed or displayed partially. There is wide empty space in right side of columns header. How to decrease this empty space so that column header text and sort icon can appear in this area?

排序后,除已排序的列以外的所有列中的排序图标均丢失. 如何坚持下去?

After sorting, sort icons in all columns except sorted one are lost. How to persist them ?

推荐答案

viewsortcols:[true,'vertical',true]

viewsortcols : [true,'vertical',true]

这篇关于如何使排序图标在jqgrid的所有列标题中可见,而与排序状态无关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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