Datatable row selection

Dear webix team,

i have a problem selecting the actual row index.

I need the row index to have the ability to add a new item at that row index.

Please check out the below snippet.

https://snippet.webix.com/vjh41814

Sort the data by “Released”. Select item with ID 4. Click the “Click me” button.

The result i get is 4 but i would like to get 2 as the item is in the second row.

Is there a way to get the selected row index?

Kind Regards,

Simon

@SimonPriber
you need the index of selected row, not its id.
check this
https://snippet.webix.com/zlv4k3st

getSelectedId().row actually returns rowid of id object
https://docs.webix.com/api__ui.datatable_getselectedid.html

@intregal Thank you for your fast response this is exactly what i need.