Set default sort on Reset click

Set default sort on Reset click

  

Hi,

When i click the reset button to reset my search filters on an aggregate, i would like for the sorting of the aggregate to return back to sorting on the default column.  How could this be done?  With the wrapper of the aggregate and the search filters being refreshed via ajax, it still does not return to default sort but keeps sorted column as it was set before reset was clicked.

thank you in advance

Jason

Solution

Hi Jason,

I don't think you can easily reset the sorting criteria of a table, but you can mimic that by setting the current sorting criteria to the same you initially specified as the default one.

You can use the List_SortColumn_SetOrderBy server action (from RichWidgets) to set what is the sorting criteria you want applied...

If you want to be able to easily control what is the default sort column, my suggestion would be for you to have the default Sort Column defined in a Site Property, that you can then pass to List_SortColumn_GetOrderBy as the DefaultOrder input parameter, and can also use in List_SortColumn_SetOrderBy as the Column input parameter, when you want to reset it.

Solution

thank you for the suggestion Jorge, I will try that and see how it turns out.

Sorry if this is a silly question but how can i set the property/event List_SortColumn_SetOrderBy on the reset event?


Hi! 

Just drag it to the refresh action, it is in the "RichWidgets". 

Regards

Graça


when trying to do that, i get the red circle with line through it indicating its not allowed.

Jason Waltman wrote:

when trying to do that, i get the red circle with line through it indicating its not allowed.


Hi Jason,

Like Jorge Martins said, what you need to use is the List_SortColumn_SetOrderBy action. Not List_SortColumn.
You can get it by managing your dependencies in RichWidgets.