Sort on column within Group

QuestionsSort on column within Group
Steven Borruso asked 4 months ago

Hello Abu,

I’ve used the Grouping function to successfully group specific rows. Works like a champ.

I now need to be able to sort on a particular column within each group.

Example –

+ Group 1

junk 0070 junk2 …

junk 0030 junk2 …

+ Group 2

junk 0090 junk2 …

junk 0020 junk2 …

I need the rows within each group to be sorted by the 2nd column value.

Any assistance is most appreciated.

Thanks,

Steve

2 Answers
Steven Borruso answered 4 months ago

To clarify … I have sorting (by the user) turned off on all grid columns … I just need the sorting within each group to happen when the grid first loads

Steven Borruso answered 4 months ago

Think I just solved this … easier than I thought … I just specified to sort on the 2nd grid column and the sort is respected within each group when the grid loads …

$grid[“sortname”] = “times”;
$grid[“sortorder”] = “ASC”;

 

Your Answer

4 + 12 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!