Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: How to select an item in sap.ui.table.Table without using index?

$
0
0

Hi Tobias,

 

What you could do is first find the JSON object (i.e., the table row) in your table model, and use its index in the model to set the selected index:

 

var matches = $.grep(array, function() {    return(this.firstName === "John" && this.lastName === "Doe");
});
if (matches.length) {    var index = yourTable.getModel().getData().indexOf(matches[0]); //first match    yourTable.setSelectedIndex(index);
}

Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>