cancel
Showing results for 
Search instead for 
Did you mean: 

Table onSort Action

Former Member
0 Kudos

How do you determine which column was clicked for sorting by the user?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The "onSort" event has a parameter named "col" containing at runtime the ID of the table column that was clicked.

To use it inside the action handler, you have to do a parameter mapping. In older releases this has to be done programmatically in method wdDoModifyView() like this:


if (firstTime)
{
  IWDTable myTable = (IWDTable) view.getElement("ID-of-Table");
  myTable.mappingOfOnSort().addSourceMapping
  (
    IWDTable.IWDOnSort.COL, /* event parameter name constant */ 
    "columnID" /* action parameter name */
  );  
}

If there is no interface IWDOnSort in your release, use "col" as event parameter name.

The action must have a parameter "columnID" od type "string".

Armin

Former Member
0 Kudos

Thanks Armin. That was exactly what I wanted to know.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Before creating the table arrange the sort is possible i Think so.

thanks,

Lohi.