Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

sap.m.table focus

Hello Forum,

I have a table with some fields editable in each row. Pushing an icon these fields are editable and not editable at occurrance using the model update.

So, when I choose a very bottom row for edit mode, and the model is updated, the table scroll returns back to first row. How I can fix the focus?

1 Comment

Hi Salvatore


The update the focus for the last row you can use this coding - and adjust to your needs.


 

// Get all Items
var items = tabOrderItems.getItems();

// Get Item number 2
var item = items[1];

// Get Item Cells
var cells = item.getCells();

// Get Cell Number 2
var cell = cells[1];

// Set focus on Cell 
setTimeout(function() {
cell.focus();
}, 300);


 

PS: JS Index always starts at 0.


Regards

Ole Andre 

Login or Signup to post a comment