saseow
Posts: 744
|
Posted: 03/23/2013, 4:29 AM |
|
This must be so fundamental but I just cannot figure this out:
I have a grid that spans several pages. If I edit a record in page 4 for example, how do I get the page 4 (and possibly the edited record) to show after the Submit on the editor is clicked?
I am thinking HTML bookmarks, but..........????
|
|
|
ckroon
Posts: 869
|
Posted: 03/23/2013, 12:59 PM |
|
Let me get this straight:
You have a Grid with Detail(Edit) links that take you to a different page... and when you are done editing it goes back to the Grid page, but you lose the Paging... correct?
If I do have it correct.. then you may have Remove Parameters set on your Edit link.
When you select a Page on your Master Grid using the Navigator it puts an element in to the URL:
GridNamePage=2
That should stay unless you removed it.
More likely..if the Edit page has a Search Component on it, and you use it.. the URL value will get reset if the Preserve Parameters on the Search Component is set to None (which is the default)... change that to All.
_________________
Walter Kempees...you are dearly missed. |
|
|
saseow
Posts: 744
|
Posted: 03/23/2013, 1:38 PM |
|
Thanks for the reply ckroon.
This should work but it does not. Both the grid and the record page do not remove any parameters and preserve the GET parameters. e.g. Say I am on page 3 of the grid then link in the grid has this URL:
http://localhost/ns_ultrasound/log_editor.php?s_from=Ma...10&ref_doctor=2
The Page 3 is there as expected. The Submit button has this URL:
http://localhost/ns_ultrasound/log_editor1.php?ID=221.
The page just does not get returned even though there are no Remove Parameters.
|
|
|
saseow
Posts: 744
|
Posted: 03/23/2013, 3:55 PM |
|
My mistake.
I had a redirect from one edit page to another depending if it was in edit mode or not.
Removed that and all is now well.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 03/23/2013, 10:12 PM |
|
My 2 cents worth, this can sometimes be useful, but probably not in this case:
You can have a hidden field GridPage or GridPageSize on a search form and set the form or hidden field Before Show Event thus:
(remember to substitute "Grid" with your actual grid containername.)
$GridPage = (CCGetFromGet("GridPage"));
formname->GridPage->SetValue($GridPage);
This way it re-appends to the URL when the search button is pressed.
I think this might work as well:
$formname->GridPage->SetValue(CCGetFromGet("GridPage"));
I don't use the PageSize option in the navigator, I put links in a separate cell in the grid header.
This way the page size option doesn't travel to the bottom of the page when the grid is expanded.
I put links with href Text to display static =10, 25, 50 so on and the links href source / parameters is set like : Parameter Source 10, Parameter Name GridPageSize, type = Expression.
_________________
Central Coast, NSW, Australia.
|
|
|
saseow
Posts: 744
|
Posted: 03/24/2013, 3:42 PM |
|
That is a neat idea Michael. Thanks.
|
|
|
|