cancel
Showing results for 
Search instead for 
Did you mean: 

Table Property

Former Member
0 Kudos

Experts,

1. How to change the property of table like grouping some fields.

2. How to do sorting in the table according to different fields which we retrieve in the page.

Thanks

Nityanand Arya

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

HI

Look at these code in Your TableSorter.java class

String columnId = wdEvent.getString("selectedColumn");
String direction = wdEvent.getString("sortDirection");
IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
NodeElementByAttributeComparator elementComparator = (NodeElementByAttributeComparator) 
 
and we pass init(table, sortAction, comparators, *sortableColumns*);

TO implement sorting of a table in a button located at toolbar of table . You have to see the TableSorter.java class and modify its structure to make sort available in this case (Button)

[Sorting Context Node of table |https://wiki.sdn.sap.com/wiki/display/Snippets/Sorting%20Context%20Node]

[Enhanced Web Dynpro Java TableSorter for SAP NetWeaver 04s|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3287] [original link is broken];

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi NityaAnand

Use new TableGroupedColumns when creating table.

GroupedColumn has property "groupingValue".

Bind this property to necessary context attribute.

Check the Sap help..

http://help.sap.com/saphelp_erp2005vp/helpdata/EN/b5/ac884118aa1709e10000000a155106/content.htm

Thanks

Tulasi Palnati

Former Member
0 Kudos

Hi,

Right click on table > InsertGroupedColumn>TablecolumnGroup

Refer this [BLOG|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3287] [original link is broken] [original link is broken] [original link is broken]; table sorting step by step procedure is there.

Regards,

Sunaina Reddy T