on 06-16-2009 11:31 AM
Hi Colleagues,
Code is :
IWDTransparentContainer TableHeaderContainer = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
IWDGridLayout TableHeaderLayout =(IWDGridLayout) TableHeaderContainer.createLayout(IWDGridLayout.class);
IWDTable tableheader = (IWDTable) view.createElement(IWDTable.class, null);
IWDNodeInfo nodeInfo = wdContext.getNodeInfo().getChild("IterateValues");
tableheader.bindDataSource(nodeInfo);
tableheader.setDisplayEmptyRows(false);
tableheader.setDesign(WDTableDesign.TRANSPARENT);
tableheader.setFixedTableLayout(true);
tableheader.setDisplayEmptyRows(true);
tableheader.setVisibleRowCount(0);
tableheader.setRowSelectable(false);
WDTableGridMode mode1 = WDTableGridMode.NONE;
tableheader.setGridMode(mode1);
WDTableSelectionMode sm1 = WDTableSelectionMode.NONE;
tableheader.setSelectionMode(sm1);
IWDTableColumn columnhead = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead);
IWDCaption Col1header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col1header.setText("Title");
columnhead.setHeader(Col1header);
columnhead.setWidth("80%");
IWDTableColumn columnhead2 = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead2);
IWDCaption Col2header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col2header.setText("Size");
columnhead2.setHeader(Col2header);
columnhead2.setWidth("20%");
IWDTableColumn columnhead3 = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead3);
IWDCaption Col3header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col3header.setText("Download");
columnhead3.setHeader(Col3header);
columnhead3.setWidth("25%");
WDTableColumnHAlign align = WDTableColumnHAlign.CENTER;
IWDGridData tableheaddata = tableheader.createLayoutData(IWDGridData.class);
tableheaddata.setPaddingLeft("10px");
tableheaddata.setPaddingTop("7px");
TableHeaderContainer.addChild(tableheader);
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Jun 16, 2009 12:32 PM
Edited by: Swetha Nellore on Jun 16, 2009 12:35 PM
Hi Swetha,
Set the visibleRowCount to 0.
After the data binding the table will respond to the data in the node.
If the table is displaying a row, it must an element must from the node bound to the table.
Please check the cardinality of the node ensure that it is 0...1 or 0...n. Do not add any element to the node.
Regards,
Kartikaye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi colleagues,
By using the above code i am able to design a table with only three column headers ......without any rows..
But it is giving me Scroll bar at the right of the table...Could any one please let me know how to remove the scroll bar at the right?
Thanks & Regards
Swetha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santosh,
i have tried setting visiblerow count to 0...now i am getting the scrollbar on the right
Actually what i am trying to do is:
Depending upon the node size we are generating tables....i.e if node size is 3 then 3 tables needs to be displayed...and each table should have a table header....and one row....should not have any column headers......it is achieved by me....
Now we have three Tables (looks like this....with out column headers)
Table1 Header
Googe 10KB Button
Table2 Header
Gmail 10KB Button
Table3 Header
Yahoo 10KB Button
Now we need to display as ( need a cobined Column headers for all the tables) like....
Title Size Download
Table1 Header
Googe 10KB Button
Table2 Header
Gmail 10KB Button
Table3 Header
Yahoo 10KB Button
To achieve this...i am creating an anither table above the previous table with only headers....
Thanks & Regards
Swetha
while creating a table with only Headers.....
i am facing the above problem....
i.e
If i use
tableheader.setScrollableColCount(-1);
tableheader.setVisibleRowCount(0);
i am getting a table with only header values but giving a scroll bar at the right
if i use
tableheader.setScrollableColCount(-1);
tableheader.setVisibleRowCount(5);
i am getting a table with a single row ...without any scrollbar...
Is this possible to get a Header row ...with out any rows...
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Jun 16, 2009 1:34 PM
Edited by: Swetha Nellore on Jun 16, 2009 2:01 PM
One more option would be using cell varaints provided if you have EP7.0 as this exists only in this version. Check this link
http://help.sap.com/saphelp_nw70/helpdata/en/c1/fa7842fdb70f53e10000000a155106/frameset.htm
Now you can create only one table with the headers.But while filling the data you have to fill Table1Header etc., and the links data in the alternate rows
Hi,
I tried with your code i made small modifications and it is working fine for me
IWDTransparentContainer TableHeaderContainer = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,null);
IWDGridLayout TableHeaderLayout =(IWDGridLayout) TableHeaderContainer.createLayout(IWDGridLayout.class);
IWDTable tableheader = (IWDTable) view.createElement(IWDTable.class, null);
IWDNodeInfo nodeInfo = wdContext.getNodeInfo().getChild("IterateValues");
tableheader.bindDataSource(nodeInfo);
tableheader.setDesign(WDTableDesign.TRANSPARENT);
tableheader.setFixedTableLayout(true);
tableheader.setScrollableColCount(-1);
tableheader.setVisibleRowCount(0);
tableheader.setWidth("400");
tableheader.setFooterVisible(false);
tableheader.setRowSelectable(false);
WDTableGridMode mode1 = WDTableGridMode.NONE;
tableheader.setGridMode(mode1);
WDTableSelectionMode sm1 = WDTableSelectionMode.NONE;
tableheader.setSelectionMode(sm1);
IWDTableColumn columnhead = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead);
IWDCaption Col1header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col1header.setText("Title");
columnhead.setHeader(Col1header);
columnhead.setWidth("40%");
IWDTableColumn columnhead2 = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead2);
IWDCaption Col2header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col2header.setText("Size");
columnhead2.setHeader(Col2header);
columnhead2.setWidth("20%");
IWDTableColumn columnhead3 = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
tableheader.addColumn(columnhead3);
IWDCaption Col3header = (IWDCaption) view.createElement(IWDCaption.class, null);
Col3header.setText("Download");
columnhead3.setHeader(Col3header);
columnhead3.setWidth("20%");
WDTableColumnHAlign align = WDTableColumnHAlign.CENTER;
TableHeaderContainer.addChild(tableheader);
Try to set some width for the table and make FooterVisible as false
tableheader.setScrollableColCount(-1);
tableheader.setVisibleRowCount(0);
tableheader.setWidth("400");
tableheader.setFooterVisible(false);
This should avoid the scroll bar...
Regards,
Saleem
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.