on 06-19-2007 11:08 AM
Hi to all..
Can anybody explain tht how to create the table dynamically and also How to insert the values in it... Explain in detail with coding...
Urs GS
Sathis,
Have a Look at these Documents Also,
Dynamic UI Elements:
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
While creating any table you have to take care of the datasource Node.
Here the data source node lets assume is say A.
If we take an example into consideration :
Node Biodata -
Attributes :Name , City, Address.
Now in the wdDoModifyView you'll require to do the following under firstTime(default visibility)
if(firstTime){
IWDTable table = (IWDTable)view.createElement(IWDTable.class,"table");
Iterator i = wdContext.nodeA().getNodeInfo().iterateAttributes();
while(i.hasNext()){
IWDAttributeInfo attInfo = (IWDAttributeInfo)i.next();
IWDTableColumn tableColumn = (IWDTableColumn)view.createElement(IWDTableColumn.class,attInfo.getName()+"column");
IWDTextView textView = (IWDTextView)view.createElement(IWDTextView.class,attInfo.getName()+"textView");
textView.bindText(attInfo);
IWDTableStandardCell tableCellEditor = (IWDTableStandardCell)view.createElement(IWDTableCellEditor.class,attInfo.getName()+"editor");
tableCellEditor.setEditor(textView);
textView.setVisible(WDVisibility.VISIBLE);
tableCellEditor.setVariantKey(attInfo.getName()+"i");
tableColumn.addCellVariant(tableCellEditor);
tableColumn.setVisible(WDVisibility.VISIBLE);
}
table.bindDataSource(wdContext.nodeA().getNodeInfo());
IWDTransparentContainer transparentCont = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
transparentCont.addChild(table);
table.setVisible(WDVisibility.VISIBLE);
}
The above code takes care of creating a table dynamically.
Also create some elements for the dataSource node to see the result.
Regards
Amit
Message was edited by:
Amit Kesari
Message was edited by:
Amit Kesari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sathish ,
Paste your mail address here.. I have one sample application.. I can sedn you .. you will get how to code.. Instead of following sdn links...
Thanks Avijit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.