Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Sorting EditTable

What is the procedure for sorting an SRP EditTable. Unlike OI (ClickPos/SORTEDCOL), when using "OnHeaderClick" there is no indication of which edit table has been clicked as I have 2 SRP edit tables. Also, in OI there is an indicator on the column header which header has been sorted. What is the equivalent in the SRP edit table.
I am new to using the SRP EditTable so any suggestions would be grateful.

Chris

Comments

  • edited March 23
    Hi Chris,

    The SRP EditTable does not have a built-in sort feature. So you will need to implement this yourself. Here are some tips on doing this:
    • Use the OnHeaderClick event as you have already indicated.
    • Remember, the name of your SRP EditTable is provided in the CtrlEntId argument of that event so that is how you can distinguish one SRP EditTable from another.
    • In this event get the ARRAY property. If you need to sort by a formatted column (like a date column), then first ICONV the column data. Then use the SRP_Array SortRows service to sort. OCONV the formatted column data if needed. Use the ARRAY property to put the data back into the SRP EditTable.
    • Use the HeaderArrow property as a way to determine the current sort as well as the way to identify the new sort.
  • Thanks for your advice.
Sign In or Register to comment.