Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get index of row when valueHelpRequest fired on sap.ui.table.Table ValueHelpField column

Hi All,

I have a problem about getting index of row when I click valueHelp button on a column which template is ValueHelpField .

Actually I wrote a code at event function to get index of table .

  1. var oTable = sap.ui.getCore().byId("oMagazaTable"); 
  2.   var row = e.getSource().getParent(); 
  3.   var tableindex = oTable.indexOfRow(row); 

This code works perfect during table doesn't have rows which counts are not  more than visiblerowcount .

If Table has more rows  this code does not take the scroll bar position  , and makes the first visiblerow's index as 0 .

So because of this giving me wrong index number  .

I need to to add scroll bar position into index data ,

So How can I get  scroll bar index position?

or If you know any other way to get index for my case  please  let me know .



Former Member


var path = oEvent.getSource().getBindingContext("oTableModel").getPath();

  var row= path.substring(path.lastIndexOf('/') +1);

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question