Skip to main content
New Participant
March 22, 2021
Question

Require sorting in every column in editable grid.

  • March 22, 2021
  • 6 replies
  • 0 views

I am already know populating data through Rule expression with sort in one column.

My requirement is to sort every column in editable grid.

Is there any way to do the same.

    6 replies

    mikes0011
    Brainy
    March 22, 2021

    Sorting on columns is only supported (directly) in the Read-Only grid component.  In general, having columns dynamically sortable in an Editable Grid is not a very good idea, as it can cause stuff to get shuffled around in a way that will be very hard to debug and support.  What is your use case?

    The Expression Guru
    New Participant
    March 22, 2021

    Hi Mike,

    I am already fetching data in editable grid with few grid-columns.Before editing any row, I just want to click(or something like that) on any column header to sort data(both asc/desc). This functionality should work for every column present in editable grid.

    New Participant
    March 23, 2021

    Suppose I edit every column of editable grid,now I want to sort any column of editable grid.The sorting should be made available on every column of editable grid.

    davel001150
    Inspiring
    March 24, 2021

    Make all the gridLayoutHeaderCell labels null, or empty string "".  Then create an extra rowLayout and recreate all of your headerCell labels as rich texts.  A new richTextDisplayField for each column.  Now, you can not only have much tighter controls on the display of your headers (it won't look exactly the same, and maybe that's better).  You'll ALSO have the ability to add dynamic links and icons!  You can use that to change the sort of the pagingInfo of the datasubset you use to build the grid.  Make sure it's a rule input or a refresh variable and you should be set.  If you want to, you can even attach up arrow and down arrow icons to the end of your rich text ersatz header.

    That's going to put you through a lot of work to reimplement the same functionality you had on a Paging Grid, but it's doable.