Skip to Content
author's profile photo
Former Member

how to capture button index

Hai all,

I need ur help,

I have a page where it displays product details with "add to cart" button. when i click on this button i need to capture index of that button and need to send the selected record to my temp internal table...

how can we do this using tableview control

if anyone already worked on this plz send some sample code

Thanks

leo

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on Dec 17, 2004 at 07:42 AM

    Have you checked the examples for the tableView?

    It's actually quite easy. Once you have your tableView marked selectionMode="SINGLESELECT" you can then read the value of the selectedRowIndex of the tableView and that contains the value of the selected row you can then use that to read your table.

    Have a look at this weblog series from me there is an excellent example with all the code you need in it:

    /people/sap.user72/blog/2004/09/07/bsp-howto-exploring-bsp-development-and-the-miniwas-620

    Pay particular attention to Part 3b (/people/sap.user72/blog/2004/09/13/bsp-howto-exploring-bsp-development-and-the-miniwas-620-part-3b)

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2004 at 07:46 AM

    The index of your button ... do you mean the ID that is used in the HTML output?

    What kind of tableview are you using? (singleselect, multiselect) ... also, where is your button placed? In the tableview?

    Do you use MVC or regular pages?

    Add comment
    10|10000 characters needed characters exceeded