Sort In Readonly grid

Certified Associate Developer

Hi everyone,

There is a read-only grid that uses a record-type data source. The table structure is as follows: Request Id (Primary Key) Name (varchar) In the grid filters, I’m applying a filter on the Request Id using the IN operator, and passing the values {9, 5, 3}. However, the grid displays the results in sorted order as {3, 5, 9}. I want the grid to display the records in the same sequence as the values I pass in the filter — i.e., {9, 5, 3} — without sorting them. How can I achieve this?

Thanks in advance !

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Goddati Venkatesh

    i'm saying you can handle sorting in queries by adding a new / separate column, which would hold sequential numbers (i.e. 1 - 3 in your case), ordered per how you want the results to come back.  such a column would usually be named "ordinal" or maybe "sort order" (the name doesn't matter much as long as its intention is clear).  this also enables you to change the default queried order in the future without having to "fix" how the elements are queried onto interfaces.

Children
No Data