on 12-31-2007 9:20 AM
hi all
I create a table and added few columns dymically to it,now problem is how to get the column header of the column ,since i need to send to db on saving.
please this urgent.
Regards
sharan
Hi,
You write the following code to access the column header:
IWDCaption cap1 = (IWDCaption) viewObj.createElement(IWDCaption.class,"cap1");
// cap1 is the ID of your caption.
String colHeader = cap1.getText();
This you can set in one of your attribute and access it anywhere.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Saisharan,
You can acheive this by writing code similar to following in wdDoModifyView method :
IWDTable tab = (IWDTable)view.getElement("tablename");
String col = tab.getGroupedColumn(index).getHeader().getText();
My table contained grouped columns.
If your table contains simple columns use
String col = tab.getColumn(index).getHeader().getText();
Regards,
Mayuresh
PS : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Edited by: Armin Reichert on Dec 31, 2007 12:33 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create context attribute and assign it to the table column header. So that u can access this context value whereever you want. You can set header name by assigning value to the context at wdInit method of your program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.