无论排序状态如何,如何在 jqgrid 的所有列标题中显示排序图标 [英] how to make sort icons visible in all column headers in jqgrid regardless on sort status

查看:19
本文介绍了无论排序状态如何,如何在 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天全站免登陆