on 11-25-2005 11:23 AM
Hi all,
I have at design time a table with 3 colums in this order: A-B-C.
At runtime I need to order colums in other sequence, for example C-B-A.
some ideas?
Thanks
Andrea
the problem is that table is created at design time, not at runtime, so i can't use IWDTable.swapColums() because IWDTable don't exist...
Can I manipulate an element create at design time?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't make any difference whether it is created during the the design time or runtime to access the elements during the runtime.
Add this code in <i>wdDoModifyView()</i>
//Get the container of the table.
IWDTransparentContainer cont = (IWDTransparentContainer)view.getRootElement();
IWDTable tab = (IWDTable)cont.getChild(<Index_of_table>);
//Assuming that 'A' is the first column and 'C' is the third column.
tab.swapColumns(0,2);
UI elements created at design time can be accessed inside method wdDoModifyView(). This method has a parameter "firstTime" that indicates if this method is called for the first time after view creation. If you want to make one-time-changes to the view layout, put your code inside an if-statement like
wdDoModifyView(..., boolean firstTime, ..., IWDView view)
if (firstTime)
{
// access Table by ID
IWDTable table = (IWDTable) view.getElement("<tableID>");
// swap columns 0 and 2
table.swapColumns(0, 2);
}
Armin
hi andrea,
u can change the order of column by using swapcolumns.for this u refer this link http://help.sap.com/saphelp_nw04/helpdata/en/0e/23b3c8b0a238439f664f73a04e6332/frameset.htm
This link also helpful to u this for sorting (temporary)https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on creating tables in web dynpro - 11_0_.htm
i hope this helps,
with regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andrea,
Are you using NW 7.0?
If so, then check that all your columns are of new type GroupedColumn. 'cause it seema that you have a mix of new GroupedColumns and obsolete Column instances. And they are ordered in wired way
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IWDTable.swapColumns(i,j)
IWDTable.removeColumn(i)
IWDTable.addColumn(column,i)
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.