on 04-04-2008 2:27 PM
HI Experts,
I have a dynamic table which contains 30 columns.Apart from these column,I want to add 1 more column of my own at the beginning of the table
Please suggest me .
Regards
-Sandip
Hi,
Use the following code to add your column to the beginning.
//Your existing table
IWDTable table = (IWDTable)view.getElement("Table");
IWDTableColumn tableColumn = (IWDTableColumn)view.createElement(IWDTableColumn.class);
//use the following if you are on old version
table.addColumn(tableColumn, 0);
//use the following in CE
table.addGroupedColumn(tableColumn, 0);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello sandip,
One change in code
IWDTable table_all = (IWDTable)view.getElement( "Table");
table_all.addColumn( (IWDTableColumn)view.createElement( IWDTableColumn.class, 0);
// The last value would be the index of the column that comes in table
Thanks Armin for notifying my mistake.
Regards
- Vinod V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Vinod,
The problem has been resolved.This is how I added a blank column in my dynamic table.
Its working fine.
.....................................................
// Add a blank column at the beginning of the table
column = (IWDTableColumn)view.createElement(IWDTableColumn.class, null);
caption =(IWDCaption)view.createElement(IWDCaption.class, null);
editor.bindText("calculation_col.Zzgrpnr_calculate");
caption.setText("New Blank Column");
column.setHeader(caption);
editor = (IWDTextView)view.createElement(IWDTextView.class, null);
column.setTableCellEditor(editor);
table.addColumn(column,0);
.......................................................
Regards
-Sandip
Hello sandip,
Try this code
IWDTable table_all = (IWDTable)view.getElement( "Table");
table_all.addColumn( new IWDTableColumn(), 0);
// The last value would be the index of the column that comes in table
Regards
- Vinod
*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.