on 11-03-2009 9:36 AM
Hi Experts,
I have created WD program and added table sorter in it. I have used following PDF for creation of table sorter.
Initially the UI displays following records:
Name Emp No Salary
Adam 576 109
Barmith 989 879
----------
----------
Now when I am clicking on Emp No field of sorter, the 10,000 records of table get sorted in ascending order of Emp No.
However the UI still shows the first record (highlighted row) as shown below. This record of "Adam" is in 10th page of table.
Name Emp No Salary
Adam 576 109
Smith 989 879
----------
----------
User has to click on "First Row" button to view record of Emp No 1.
My requirement is as below:
1) Initially the table UI will display the table records in any way. Any random row will be selected and highlighted as first row.
2) User will click on Emp No sorter (ascending). The record of table should get sorted in ascending order of Emp No.
3) Table UI should display the first page of table and cursor should be on the Emp No 1
Please help.
Regards,
Gary
Hi Gray,
you have to write the following code to solve your problem in onActionSort() function
public void onActionSort(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSort(ServerEvent)
wdContext.currentContextElement().getTableSorter().sort(wdEvent,wdContext.nodeProducts());
//Set Lead Selection to 1st Element
wdContext.nodeProducts().setLeadSelection(0);
//@@end
}
setLeadSelection() method will help you to select the 1st row of the table.
Hope this helps you
Regards,
Sruti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.