Skip to Content

Dynamically change the cell editor in the table control


I have 3 columns in a table . of which in one column we need to change the cell editor dynamically at runtime.

i.e for example i have columns as carrid, connid and fldate.

For the first 2 rows the cell editor for the carrid clomn shud be a dropdown and from there on in the next rows for the same carrid column it shud be a input field.

Can experts plz help me how to achieve this as this is very high priority issue....



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 31, 2008 at 02:50 PM

    This is actaully fairly simple to do. You will need to add a cellVariant to your table column. You can then dataBind a context attribute to the selectedCellVariant property of the column to control which cellVariant will be used. This allows you to control row-by-row which cell editor you want to output.

    Also here is an example that I did the other day that uses Cell Variants within ALV. This process is actually a little more complicated because you have to go through the ALV APIs. To do this in a normal table is actually easier because you can create the cellVariant in the layout designer.


    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.