Retain column sorting

Retain column sorting

  
Hi,

I have one list page, from this page I can navigate to any other page. If I click on back button of browser then list is sorted with the default column which should not happen. sorting should be done on last selected column.

Is there any way to retain column sorting when we navigate through the page?

Regards,
Sagar S. Nannaware
Can you place a screenshot image of your project, maybe i can find a solution
Sagar Nannaware wrote:
Hi,

I have one list page, from this page I can navigate to any other page. If I click on back button of browser then list is sorted with the default column which should not happen. sorting should be done on last selected column.

Is there any way to retain column sorting when we navigate through the page?
 
 
Hello Sagar,

To get the behavior you want, you should create a Session Variable to store the order by variable and have this variable as an input parameter of the query that binds your list.
If you have any doubts about this let us know..

Best Regards,
Gonçalo M.
If I do so then "List_SortColumn" widget should be removed and I dont want to do that.

Is there any way to store selected column name in session by keeping "List_SortColumn" widget.


Regards,
Sagar S. Nannaware
Here is a brief explanation of how the List_SortColumn is used... I hope this help.

1. Order By of the query ... this is what your table is sorting on.   If you added other parameters to the order by it would sort by this field as well.  By passing in  "List_SortColumn_GetOrderBy" on the view ... it determines if the user hasn't clicked on something else to sort the list.  The text string being passed in : "{ADDRESS}.[Line1]" is the default if it doesn't find anything.  I haven't tried it yet, but you could probably also call it as an action to get the value that is returned by the function.



2. There is a specific sorting widget that is included in your table to change the sorting that is being done.  It is called "List_SortColumn".  This widget generates a link around the text in the cell where it is located to set the order by on the query above.  This is why is calls the "Refresh" action.  This will force the view to change its sorting and refresh.   If you don't want to have the users resetting how the table is being sorted, the "List_SortColumn" widget would need to be removed since this will reset how the view is being resorted.





By passing in the name of the column to this widget, you are storing the column that is being sorted.

3.  If you want to programatically resort your view by something else, you can use the Action "List_SortColumn_SetOrderBy" to dyanically sort your view on something else.  You will need to make sure to refresh your query and your table on the page.  Usually the default Refresh action that is generated is sufficient to do everything.
Sagar Nannaware wrote:
If I do so then "List_SortColumn" widget should be removed and I dont want to do that.
 
 
No, Sagar...
Just look at Rebecca's explanation because she really did it very well..don't need to add more information to it.

Cheers,
Gonçalo M.


 
Rebecca,

Thank you for the explanation. It helps me a lot.



Rebecca Hall wrote
:
Here is a brief explanation of how the List_SortColumn is used... I hope this help.

1. Order By of the query ... this is what your table is sorting on.   If you added other parameters to the order by it would sort by this field as well.  By passing in  "List_SortColumn_GetOrderBy" on the view ... it determines if the user hasn't clicked on something else to sort the list.  The text string being passed in : "{ADDRESS}.[Line1]" is the default if it doesn't find anything.  I haven't tried it yet, but you could probably also call it as an action to get the value that is returned by the function.



2. There is a specific sorting widget that is included in your table to change the sorting that is being done.  It is called "List_SortColumn".  This widget generates a link around the text in the cell where it is located to set the order by on the query above.  This is why is calls the "Refresh" action.  This will force the view to change its sorting and refresh.   If you don't want to have the users resetting how the table is being sorted, the "List_SortColumn" widget would need to be removed since this will reset how the view is being resorted.





By passing in the name of the column to this widget, you are storing the column that is being sorted.

3.  If you want to programatically resort your view by something else, you can use the Action "List_SortColumn_SetOrderBy" to dyanically sort your view on something else.  You will need to make sure to refresh your query and your table on the page.  Usually the default Refresh action that is generated is sufficient to do everything.