ORDERING MULTIPLE COLUMNS

QuestionsORDERING MULTIPLE COLUMNS
josep asked 5 years ago

In a PHPGRID whose data is loaded from an array
I want to make two TELEPHONE ordered and F_CREACION columns (are the names of the columns and the last is a date field) but can not get sorted out

$grid["sortname"] = 'TELEFONO ASC ,F_CREACION DESC ';
$grid["sortorder"] = "ASC";

Once loaded is there any method to sort by multiple fields?

1 Answers
Abu Ghufran answered 5 years ago

For initial sorting, you need to set:

$grid["sortname"] = 'TELEFONO ASC ,F_CREACION';
$grid["sortorder"] = "DESC";

This will make telefono asc, f_creacion desc.

Multiple sorting after loading is currently not supported.

Your Answer

10 + 15 =

Login with your Social Id:

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!