Page 1 of 1
sorting in tablename_view.php
Posted: 2015-10-31 15:46
by sueirna
how to change sorting field in tablename_view.php.tq
Re: sorting in tablename_view.php
Posted: 2015-11-01 21:04
by a.gneady
Just click on the column title to sort ascendingly. Click again to sort descendingly.
Re: sorting in tablename_view.php
Posted: 2015-11-02 13:53
by sueirna
i found this, and i've tried to change field like below, and it's working.
$x->DefaultSortField = '2';
$x->DefaultSortDirection = 'desc';
Re: sorting in tablename_view.php
Posted: 2015-11-19 06:33
by a.gneady
Aha .. Sorry, I didn't get it at first that you meant default sorting. Your code edit would work ... however, an easier method without editing code is to specify the default sorting in AppGini .. Just select the concerned table, and specify the default sort field and direction from the table options, then regenerate your application.
Re: sorting in tablename_view.php
Posted: 2020-09-28 07:59
by fbrano
Also working via hook file tablename.php
function tablename_init(&$options, $memberInfo, &$args){
$options->DefaultSortField = '3';
$options->DefaultSortDirection = 'asc';