Sort read only fields of an editable grid

Hi,

I have an editable grid with 5 read only fields and one editable fields . I need to sort the readonly fields . I use 

 a!gridLayout(

)

Can i add the pagingInfo inside the "with" ? 

is it possible to have a sortable editable grid ?

  Discussion posts and replies are publicly visible

Parents
  • Hi Ramanan,

    Unfortunately, editable grids cannot be used to actively sort by clicking on the header cells as can be done with paging grids. I would suggest looking at other options when designing your user experience. For example, you could make the grid a paging grid, but allow the user to select a row. When they select a row, a field appears above or below the grid that allows the user to edit the information in that row.

    If you are trying to sort the information before it gets populated in the editable grid, you can do so in the following ways:

    The best way for you to achieve this is to sort the information as you pull it from the database. As you make your query, pass the paging info into the query entity with your sort information specfied using a!sortInfo(). Then, you can control how the information is sorted as it gets pulled from the DB. When you create the editable grid, pass the sorted data to your gridRowLayout and the rows should be in sorted order. You can read more about this in the documentation: docs.appian.com/.../fnc_system_a_sortinfo.html

    If you aren't pulling from the database, you can also use todatasubset() to sort the data before populating it in the editable grid. See the documentation for further information: docs.appian.com/.../fnc_scripting_todatasubset.html

    Hope that helps!
    Jake
Reply
  • Hi Ramanan,

    Unfortunately, editable grids cannot be used to actively sort by clicking on the header cells as can be done with paging grids. I would suggest looking at other options when designing your user experience. For example, you could make the grid a paging grid, but allow the user to select a row. When they select a row, a field appears above or below the grid that allows the user to edit the information in that row.

    If you are trying to sort the information before it gets populated in the editable grid, you can do so in the following ways:

    The best way for you to achieve this is to sort the information as you pull it from the database. As you make your query, pass the paging info into the query entity with your sort information specfied using a!sortInfo(). Then, you can control how the information is sorted as it gets pulled from the DB. When you create the editable grid, pass the sorted data to your gridRowLayout and the rows should be in sorted order. You can read more about this in the documentation: docs.appian.com/.../fnc_system_a_sortinfo.html

    If you aren't pulling from the database, you can also use todatasubset() to sort the data before populating it in the editable grid. See the documentation for further information: docs.appian.com/.../fnc_scripting_todatasubset.html

    Hope that helps!
    Jake
Children
No Data