This is a migrated thread and some comments may be shown as answers.

[Solved] change de position of the 'sort' icon

2 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexandre Jobin
Top achievements
Rank 1
Alexandre Jobin asked on 29 Jun 2010, 03:01 PM
hi!

is it possible to change the position of the Sort icon? i would like to place it in the middle-top of the header-cell to save space on the column width.

thank you!

alex

2 Answers, 1 is accepted

Sort by
0
Alexandre Jobin
Top achievements
Rank 1
answered on 13 Jul 2010, 07:35 PM
nobody have an idea on this?
0
sky
Top achievements
Rank 1
answered on 30 Sep 2010, 05:53 PM
this is a great idea.

the current position on the right can cause the sort indicator to be lost in tight grids.

in my opinion, if the sort indicator must be married to the header tlink, then it should be placed on the left. space should be pre allocated with a filler span when no sort is present to eliminate jiggling of the header text.

alternatively, as the OP suggests, some sort of simple configuration would be nice.

this could be accomplished by separating the sort indicator from the header link so that it may be styled into position.

I am currently post processing the rendered html in the databound client event to accomplish such functionality.

You need only reposition the .t-arrow-up icon as it is subsequently manipulated in place .

$("a:.t-link>span:.t-arrow-up").each(function (index, element)
{
    var that = $(this);
    var parent = that.parent();
    that.remove();
    parent.prepend(that);
});

Additionally, I reduce the space used by the icon by setting negative margins like so

.t-link .t-arrow-up{
     margin-left:-5px;
     margin-right:-5px;
     }
 .t-link .t-arrow-down{
     margin-left:-5px;
     margin-right:-5px;
     }
Tags
Grid
Asked by
Alexandre Jobin
Top achievements
Rank 1
Answers by
Alexandre Jobin
Top achievements
Rank 1
sky
Top achievements
Rank 1
Share this question
or