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
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)
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 a comment