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

How to Get of details Selected row

Hi,

I have created a table in UI5 in which data is displayed using gateway service. Rows of this table are binded using line oTable.bindRows("/zui_group1_getlistCollection()").

Now I want to get the username of selected row. I tried using

var selectedContext = oTable.getContextByIndex(oTable.getSelectedIndex());

alert(selectedContext);

But it gives output as : "/zui_group1_getlistCollection('ABHISROY')".

And i want only ABHISROY.

Please help.

Capture.PNG (21.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 04, 2013 at 11:12 AM

    Use Model.getProperty("name of property bound to column", selectedContext ).

    https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.model.Model.html#getProperty

    SAPUI5 SDK - Demo Kit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2013 at 04:19 AM

    thanx.

    got it.

    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.