Skip to Content
author's profile photo
Former Member

Dropdown & table.

I have a table input field.which is populataed though a node input_table which has a sub node DROPDOWN the drop down is populated by supplyfunction. I am biniding 4 empty work_area to the main node so that it allows me 4 rows for input.

Now, my problem is that i have to set a attribute in main node when user selects some thing from dropdown.For first row i am able to set. But for rest of the rows the value is not set.

I found that, if i manually selects the lead selection for the table before selesting dropdown for each row it works fine.

Do u have any idea how to over come from this ?Points will be rewarded.

Thanks,

Prosun

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Aug 14, 2007 at 12:34 PM

    Hi.

    in the onselect action of the dropdown get the elemnt thru the input parameter wdevent:

    lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

    this is the current row of the table the dropdown is in.

    Cheers,

    Sascha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Prosun.

      You are not able to give points because you did not mark this thread as question.

      To preselect an entry in the dropdown you can use set_lead_selection or set_lead_selection_index on the node containing the elements for the dropdown.

      You can do it in the supply method. I guess you want to select the correct entry regarding to an already existing row in the table?

      So you can use parent_element in the supply method to retrieve the attributes from the row. Then after adding all selection values to the dropdown node set the lead selection according to lgart.

      Hope this helps,

      Sascha