on 12-21-2004 4:02 PM
Hi WD Experts,
I can't find the solution of this very important case
Suppose this very simple scenario:
I have master-detail relation between two tables
and I try to show the content of detail table in some order (ascending order of first column)
Also in UI I want to see the sorting icon
I do this with generating of CustomEvent in OnLeadSelect
HashMap map = new HashMap();
map.put("col", "Version");
IWDCustomEvent wdEvent = new CustomEvent("onActionSort", map, true);
wdThis.onActionSort(wdEvent);
but unfortunately my detail table is ordered alternately
(asc and desc order)
In WD tutorials I find the tutorial for sorting the table
but sorting is triggered by user action - I want sorting to be executed programmatically and to be executed always in asc order
Hi Rosen,
i suggest to use a supply-function for this. Create a corresponding supply-function method for the context node, which is the data source of the table. The method will be called immediately when the context node data is needed and can be manually triggered by invalidating the node later. Create/sort the node elements there and bind (or add) them to the node in the order desired.
Hope that helps.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I am using a supply function - and sorting there is workaround - but the user can not see the sorting icon on the proper column - the first appear of icon is when user click on the column header for first time.
I want user to see which column is sorted initially
Message was edited by: Rosen Chaushev
I suppose you store the current sort direction in some context attribute. If you define a second (calculated) attribute of type String, that will always contain the icon file name for the current sort direction, and you bind the icon in the table column header to this attribute, what happens?
Armin
Hi Armin
I would rather prefer to use internal WD mechanism instead of using the context for storing the sorting icon
(WD automatically put the sorting icon in column header when user click on table header)
and more in depth - I want to create a CustomEvent - but in event I want to pass the sorting direction
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.