jqGrid排序箭头 [英] jqGrid Sorting Arrows
问题描述
对于排序,我只想显示一个与列标题对齐的箭头.我注意到 viewsortcols
允许您水平放置箭头(对齐准确),但是我想知道是否有任何技巧可以仅使用单个箭头.如果排序的一种方式是向上指向,另一种方式则向下指向.
我碰到了可能对您也很有趣.
已更新:如果要更改排序图标的位置,可以通过添加CSS(如下所示)来完成此操作
.ui-jqgrid .ui-jqgrid-labels .s-ico .ui-grid-ico-sort {margin-top:0px;}
它将图标位置更改为
和
请参见修改后的演示.
For sorting, I would like to show only one arrow aligned with the column header. I noticed that viewsortcols
allows you to put the arrows horizontally (aligned nicely), but I was wondering if there were any tricks to just use a single arrow. If sorted one way it points up, the other way it points down.
I came across this grid that is doing it...but was having a little trouble understanding their code. I do not need to use custom arrows.
The code example which you reference uses very old version of jqGrid (version 3.4.3). So it can have another behavior of sorting.
One day I misunderstand one question and have answered on exactly your question. You find the answer here. It uses the demo which create the results
and
One more answer could be also interesting for you.
UPDATED: If you want to change position of the sort icon you can do this by adding the CSS like the follow
.ui-jqgrid .ui-jqgrid-labels .s-ico .ui-grid-ico-sort {
margin-top: 0px;
}
It will change the icon position to
and
See the modified demo.
这篇关于jqGrid排序箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!