on 09-30-2006 8:20 AM
Hi SDN,
I am trying to create a Table UI Element at runtime.
To do So I have written the following code in the "wdDoModifyView" method of the view
if(firstTime)
{
IWDTable table =(IWDTable)view.createElement(IWDTable.class, null);
table.bindDataSource("TableNode");
IWDTableColumn column1=(IWDTableColumn)view.createElement(IWDTableColumn.class,null);
table.addColumn(column1);
IWDInputField editor=(IWDInputField)view.createElement(IWDInputField.class,null);
editor.bindValue("TableNode.no");
column1.setTableCellEditor(editor);
// create and add second table column
IWDTableColumn column2 = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
table.addColumn(column2);
IWDTextView editor1 = (IWDTextView) view.createElement(IWDTextView.class, null);
editor1.bindText("TableNode.name");
column2.setTableCellEditor(editor1);
IWDUIElementContainer root = (IWDUIElementContainer) view.getRootElement();
root.addChild(table);
}
After executing the application the table is created successfully. But both the columns are in TextView mode. What i need is one column should be in input mode and other in TextView mode. So please suggest me what more stuff i have to add to make the field to accept the input.
Thanks in advance.
Regards
Basha
Why do you create this table programmatically?
Concerning the question: Table rows correspond to elements in the data source node. If there is no element, all editors are displayed read-only. You have to create node elements e.g. in wdDoInit(), as much as you want to have rows.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
I need to display a table with 5 rows and 7 columns.
5 of the columns are drop downs from R/3,
My requirement is the table should be in editable mode such that the user is allowed to enter some values(rows). on clicking the save button the table values are to be sent to R/3 table through bapi.
Please help me in resolving this.
Thanks & Regards,
Sai Krishna.
Hey Basha,
Make that TableNode cordiality as 1..N. InputField is allowing enter value in it.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.