GrzegorzL
Posts: 13
|
| Posted: 02/02/2009, 3:26 AM |
|
In this example,
http://examples.codecharge.com/ExamplePack/NavGrid/NavGrid.php
I would like to reverse the order of entries.
But then it must be added the code changed.
------------------------------------------------------------------------------------------
global $employees;
global $CurrentRecord;
//Calculate the number of records up to the current page
$PreviousRecords = $employees->PageSize * ($employees->PageNumber-1);
//increment the employee count
$CurrentRecord = $CurrentRecord + 1;
//Calculate and store the current page number in the empBackPage parameter of the Emp_Name link.
$employees->emp_name->Parameters = CCAddParam($employees->emp_name->Parameters, "empBackPage", $employees->PageNumber);
//Calculate and store each employee's record number in the employeesPage parameter of their corresponding Emp_Name link.
//This parameter is used automatically by the Navigator of the Grid on the detail page NavGrid_Detail.
$employees->emp_name->Parameters = CCAddParam($employees->emp_name->Parameters, "employeesPage",$PreviousRecords + $CurrentRecord);
----------------------------------------------------------------------------------------------
Does anyone know how to do this?
|
 |
 |
damian
Posts: 838
|
| Posted: 02/02/2009, 3:59 AM |
|
edit the grid source and add a sort order
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
GrzegorzL
Posts: 13
|
| Posted: 02/02/2009, 10:31 AM |
|
In this case destroys the Navigator in the linked page.
This must be changed in the code above.
I think
|
 |
 |
damian
Posts: 838
|
| Posted: 02/02/2009, 1:15 PM |
|
what does destroy mean? does it burst into flames?
sorry - but can you be more specific? :)
what if you edit the data sourc of the nav in the next page?
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
GrzegorzL
Posts: 13
|
| Posted: 02/03/2009, 4:05 AM |
|
I found the cause.
You should have added sort order > reverse order in linked side too. And replace the condition "like" to "="
As I was doing a search by category "title" appear to have been mistakes.
Now is ok.
|
 |
 |