on 06-20-2005 4:30 PM
Please help urgently!
Hi,
1. Create a Contextattribute of type IWDTable.
2. write the following in "wdDoModifyView" method
IWDTable tab=(IWDTable)view.getElement("<<TableID>>");
wdContext.currentContextElement().setTable(tab);
3. Create an action and write the following
tab.removeColumn(<<IndexNo>>) and pass indexnumber from outside
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear at all,
thank you for you suggestion. Through your help I solved the problem by my own.
Thank you!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mehmet,
1. Create context attribute ColumnToRemove (string)
2. In action handler assign the value to this attribute
3. In wdDoModifyView do the following:
final String colID = wdContext.getColumnToRemove();
if ( null != colID )
{
wdContext.setColumnToRemove(null);
final IWDTable table = (IWDTable)view.getElement("myTable");
final IWDTableColumn col = table.removeColumn("colID");
col.destroy();
}
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make use of removeColumn() method of the table control
Ex: tabl2.removeColumn("<<columnName>>);
or tabl2.removeColumn("<<Index>>);
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't access the view layout (UI element references) in action event handlers. You have to place this code in wdDoModifyView().
In the action handler, store the information needed (e.g. table column ID, insertion position, whatever) in some context attribute or in some member variable of the view.
In wdDoModifyView(), check if table modification should be done, get the table instance using view.getElement(<tableID>), use the IWDTable API to modify the table.
Finally, reset the flag or configuration data indicating that the table should have been modified.
This is not really elegant, but that's the way it is...
Armin
hello,
the UIEs should not be maniputated in event handlers or methods. all the code should be written in wdDoModifyView().
u create some attributes which decide about the modification of the table. using those parameters u add or remove colomns:
IWDTable table = (IWDTable) view.getElement("tableid");
now u create colomn objects and add them to table object, or remove colomns.
regards,
Piyush.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.