cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create a dynamic caption(column name) in a dynamic table

Former Member
0 Kudos

Hi All,

I have created dynamic table .But the dynamic column is not showing.I have created two column name that is name and empId .I have tried with following code

IWDCaption nameCap=(IWDCaption)view.createElement(IWDCaption.class,"nameCap");

nameCap.setText("Name");

tabColumn1.setHeader((IWDCaption)nameCap);

IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");

addCap.setText("Address");

tabColumn2.setHeader((IWDCaption)addCap);

I m getting internal server error...But When i m comented the above code i can able to see tha dynamic table withput column name..Can anyone help me

Suman

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if you want to show the columns on your dynamic table, you should use the setTableCellEditor property instead of setHeader.

that is you should replace the code

tabColumn1.setHeader((IWDCaption)nameCap);

by

tabColumn1.setTableCellEditor((IWDTableCellEditor)nameCap);

The setHeader property id used to set Header for the table. and only one header can be added to a table.

regards

karthik

Former Member
0 Kudos

Hi

IWDTableColumn tabColumn1 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"N_Co");

IWDTableColumn tabColumn2 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"A_Co");

IWDInputField nameText = (IWDInputField)view.createElement(IWDInputField.class,"N_Text");

nameText.bindValue(attrib1);

tabColumn1.setTableCellEditor((IWDTableCellEditor)nameText);

IWDInputField addText = (IWDInputField)view.createElement(IWDInputField.class,"A_Text");

addText.bindValue(attrib2);

tabColumn2.setTableCellEditor((IWDTableCellEditor)addText);

<b>I need to see the column name.....</b>

for that i have written the following code...

while writting the following code i m getting internal server error

IWDCaption nameCap = (IWDCaption)view.createElement(IWDCaption.class,"nameCap");

nameCap.setText("contribution_area");

tabColumn1.setHeader((IWDCaption)nameCap);

IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");

addCap.setText("SUM");

tabColumn2.setHeader((IWDCaption)addCap);

Former Member
0 Kudos

Hi,

There is no chance for error in your code which is in previous post. please check the remaining codes of your dynamic part.

Former Member
0 Kudos

Hi Kartik,

There was problem in the version of NWDS.Not I installed Version: 2.0.15.Now it si displaying..Thanx a lot.There is no problem in ur code which u had given to me.

Suman

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I couldnt see any problem in ur code. Try to give the code as

tabColumn1.setHeader(nameCap);

Can you post the error you have got?

-Rathna.