In my datatable, last column is an image which is clickable. in column definition, i have added custom formatter for this column that attaches click event handler to this image. this handler creates the destination url based on values in other columns and rowIndex. I get the values in other columns by doing oRecord.getData('col1'), oRecord.getData('col2') and so on. But I am not able to get the row index inside this handler.
label: link, formatter: function (el, oRecord, oCol, oData) {
Event.addListener(im, 'click', function() {
var part1 = oRecord.getData('col1');
var part2 = oRecord.getData('col2');

I am not able to use getTrEl and getTrIndex. I need to know it as this rowIndex is a part of my destination URL. when I do this.getTrIndex(oRecord), I get error 'this.getTrIndex is not a function'.

Please suggest how can i get selected row index inside this formatter function. I cannot use rowSelectEvent as it is fired after link is clicked.

thanks in advance