on 01-02-2008 6:07 AM
Hi,
I created tabstrip and table in same view dynamically. I want to add this table into this tabstrip content area dynamically.
Plz give me reply asap.
Thanks
Shirisha
Hi,
As much as i understand you want to add table dynamically in a tab, which is already created.do Following steps
(1) add TabStrip in the root container and the inset a tab in tabstrip with ID "Tab"
(2) Now in wdDomodify write following code for "firstTime".
//Get the Tab
IWDTab tab=(IWDTab) view.getElement("Tab");
IWDTransparentContainer container=(IWDTransparentContainer) tab.getContent();
//Create the Table
IWDTable table=(IWDTable) view.createElement(IWDTable.class,"Table");
container.addChild(table);
I'm not writing the whole code for table, you can add the columns in the same manner and bind datasource to the already created context node.
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
I hope this solves your problem
IWDTabStrip tabStrip = (IWDTabStrip)view.getElement("TabStrip1");
//Create a tab Area
IWDTab tab = (IWDTab)view.createElement(IWDTab.class,"tab"+i);
//you can take a container inside the tab
IWDTransparentContainer container = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"container"+i);
//and thn add the container
tab.setContent(container);
//Add the table to the container
tabIntContainerC.addChild(table);
//add tab to the tabstrip
tabStrip.addTab(tab);
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this in the wdDoModifyView() method:
-
IWDTabStrip tabstrip = view.getElement("<ID of the tabstrip>");
IWDTab tab = tabstrip.getTab(<index of the tab where the table should be put>);
//You can create any container you want. I'm using a ScrollContainer.
IWDScrollContainer content = (IWDScrollContainer) view.createElement(IWDScrollContainer.class, "tabContent");
//Create Table dynamically. I guess you have already done it
IWDTable table = (IWDTable) view.createElement(IWDTable.class, "table");
//Add columns to the table dynamically here.
//...
//Add the table to the ScrollContainer
content.addChild(table);
//Set the ScrollContainer to the Tab
tab.setContent(content);
-
Regards,
Satyajit.
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.