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

Change text and action of button in table ui

Hi all,

I have table ui with 4 columns, the fourth column is of button.

I want change the text of button and action for that button based on status which is 3rd column of table.

for example:

if status = A then button text should be 'Reset' and if status = B then Button text should be'Release'.(also the action for those buttons).

can anyone suggest how to achieve this.

Thanks all in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 24, 2011 at 06:03 AM

    Hi.,

    Create two methods one for Reset and other for Release in your methods tab.,

    Now in onAction Of your button Event.,

    read the status using get attribute method.,

    if lv_status = A.

    wd_this->Reset().

    elseif lv_ststus = B.

    wd_this->release( ).

    endif.

    Similarly bind the text of button to attribute.,

    if ststus = A

    set_attribute(

    attribute_name = 'Button Text

    value = 'Reset' ).

    else.

    set text to Release.

    hope this helps u.,

    Thanks & Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi.,

      No need to change action. In the same action based on status you can differentiate.,

      if status = A

      do coding for reset.

      or create method and place code for reset and call that method

      like wd_this->reset().

      elseif status = B.

      do coding for release.

      or create method and place code for release and call that method

      like wd_this->release().

      hope this helps u.,

      Thanks & Regards,

      Kiran

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.