Conditional Grid Sorting in Web Designer

Hi all

I’m wondering if there is a way to insert conditional sorting criteria into the field “Sorting” of a Grid object in the Web Designer.

Let’s say I have a collection COLL whit some columns: column1, column2, column3.

Again, let’s say I have a variable Var that can switch from value 1, 2 , 3

What I’m trying to do is to write a Sorting condition like this:

If Var = 1 then Sorting = ‘column1, column2, column3’

If Val = 2 then Sorting = ‘column2, column 1, column3’

If Val = 3 then Sorting = ‘column3, column 1, column2’

In need to achieve this effect automatically and not manually triggered by user, acting on grid’s header.

Please, if someone has an idea, share with me.

Thanks in advance

Alberto

Parents Reply Children
  • Thanks kinshasa

    What you suggest it exactly the solution I adopted. But it sounds to be not very elegant.  Moreover, it seems to force the page to reload (I’m not sure what is reloaded) and consequentially the page scrolls up. This is annoying as there are several grids into the page and user has to scroll down again.

    Anyway, right now, this is all I have.

    Thanks.

    Alberto