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

Web Dynpro Data Grid for Inputing.

I have created a table where I allow the user to edit a table.

Here is a picture of the grid.

What I want to have happen is when the users presses the "Add" button a new entry is added to the grid.

Which is working just fine.

But here is my problem the whole grid is editable and when the user inputs something into say Group Description and then wants to save the change unless the row selected is the row they just altered they have to select the row and then hit save.

What I would like to do is when they enter something into a row I would like that row to be automatcly selected.

I cannot seem to figure out how to do that.

If you could let me know what the heck I am doing wrong please.

grid.jpg (19.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on May 24, 2013 at 04:46 AM

    Hi Steven,

    One more suggetion is..If you use onenter event of input field, after entering data in that input if you press enter you can select that row by writing some code onenter event of input using set_lead_selection.

    * navigate from <CONTEXT> to <VBAP> via lead selection
    lo_nd_vbap = wd_context->get_child_node( name = wd_this->wdctx_vbap ).

    * get element via lead selection
    lo_el_vbap = lo_nd_vbap->get_element( ).

    lo_el_vbap = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).

    lv_index = lo_el_vbap->get_index( ).

    lo_nd_vbap->set_lead_selection_index( lv_index ).

    Cheers,

    Kris.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 23, 2013 at 04:10 PM

    i don't think there is a way to automaticaly select row by entering something into it .

    what you can do if user select a row make it editable other non editable

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2013 at 07:37 AM

    Hello Steven,

    In WDA you have fixed set of events triggers during rendering. So in case you r using a input field

    you have to press a 'ENTER' to trigger a event. Only by entering data it will not work.

    During the onenter event you can identify the context element details ( index / row details ) i.e. row details & then you can set lead selction on the particular row.

    The code posted by Krishna will achieve the same easily.

    Regards,

    Monishankar Chatterjee

    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.