on 07-01-2004 8:03 AM
Hi all,
is it possible to add columns in a Web Dynpro table via code? Is there an example how to do this?
Thanks a lot.
Regards
Carsten
Hi Stefan,
thanks a lot. I will try it.
Regards,
Carsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carsten,
yes this is possible. An example showing the basics is available here: http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
In case of your table, create an instance of IWDTableColumn.class and add it using the addColumn() method of the IWDTable API. This sample uses an InputField as table cell editor:
IWDTableColumn col = (IWDTableColumn) view.createElement(IWDTableColumn.class, "newcol");
IWDInputField editor = (IWDInputField) view.createElement(IWDInputField.class, "edit");
col.setTableCellEditor(editor);
IWDTable tab = (IWDTable) view.getElement("yourTabName");
tab.addColumn(col);
If you don't need specific names for the dynamic created elements, you can use null instead of the names calling the view.createElement() method, then a unique name will be auto-generated.
Hope that helps.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.