cancel
Showing results for 
Search instead for 
Did you mean: 

get the selected rows and show it in another popup

Former Member
0 Kudos

Hi,

I am trying to get the selected rows and show them in some popup.
How we can do this please give some example.

Thanks

agentry_src
Active Contributor
0 Kudos

Can you provide some more detail along with what you have already tried?

Regards, Mike

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Trigger the selectionChange event of the Table control whose mode is SingleSelectMaster.

onSelectChange: function() { 
    var oTable = this.getView().byId("idTable");
    var oRow = oTable.getSelectedItem().getBindingContext().getObject(); //selected row
}

Access the individual property of the selected row and view it in your dialog fragment.

Answers (2)

Answers (2)

Sharathmg
Active Contributor
0 Kudos

Step 1: Get access to the table by its ID.

Step 2: Use the method - getSelectedItems()

This will provide you the items selected by the user.

Regards,

Sharath

Former Member
0 Kudos

I am using sap.ui.table.Table, in this it is not providing option to use above method...
thanks will stay in touch for other quries.

Sharathmg
Active Contributor
0 Kudos

Probably, you could try, getSelectedIndices. This will get a list of indices int he table contents and at one time retrieve the items in the table which are selected.

Regards,

Sharath

former_member365727
Active Contributor
0 Kudos

Store selected entries in a JSON model.....access the same in popup to display