cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic programming

Former Member
0 Kudos

hai,

I have a requirement like I have a table with 8 columns. If I click a button the 2nd column (basically with drop down by key) should become editable( input fields to be inserted dynamically to 2nd column cells).

I have to do in on ActionButton or in wddomodifyview ?. pls give some suggestions to create the application. As I am new to dynamic programming.....

Accepted Solutions (0)

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Rupa,

First you should create an editable table control. Just create the standard cell editors of the table control as, "Input Fields" instead of the normal 'TextView". (This can be done as follows... When you right click on the table UI element (under ROOTUIELEMENTCONTAINER) & say "Create Binding" you have the, "Standard Cell Editor" & "Standard Property" fields. Set "Standard Cell Editor" to "InputField" & "Standard Property" to "Value")

You also should have the readOnly property of the Table set to true for all the columns except the one for which you want the dynamic behaviour. (i.e, the checkbox for readOnly should be checked in the table properties) Bind the 2nd column's readOnly property to an context attribute of type WDY_BOOLEAN. Now in the action handler of the button you can toggle between the true and false values for this context attribute. ( You can do this by using the normal get_attribute and set_attribute methods of the if_wd_context_node ) This in turn would make your column as disabled/enabled. Hope that this helps resolve your problem.

Regards,

Uday

Former Member
0 Kudos

Have a look at Cell Variants. Those allow to switch the cell editors at runtime. Which cell variant is active at a point in time depends on a context attribute.

Regards, Silke