Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 09:55 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 10:04 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.