cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the TableSorter for two tables at the same view?

Former Member
0 Kudos

Hello,

I am using the TableSorter object in order to sort Dynpro tables.

Suppose I have two tables at the same view, is it possible to use it seperatly for both of them?

I assume that at the wdModifyView method I will need to catch the table that the user clicked on, yet I don't have an idea of how to do it...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I don't understand your remark "assume that at the wdModifyView method I will need to catch the table that the user clicked on".

The code in wdDoModifyView() is used to attach a TableSorter instance to a table and is only called once.

Yes, you can use different TableSorter instances in the same view.

Armin

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Roy,

Constructor of TableSorter

public TableSorter(IWDTable table, IWDAction sortAction, Comparator[] comparators)

So, you have to create instance of TableSorter class for each table on the view.

best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hello Maksim,

Of course, you are right, and then simply bind different action to each table...

Message was edited by: Roy Cohen

Former Member
0 Kudos

My experience is that it is VERY important that the node which contains the data which should be sorted is a VALUENODE and not a MODELNODE!