Hi,
Is it possible to scroll igGrid to specific row by JavaScript ?
Thanks,
Ed
Hello,
I too am very interested in this functionality. Is there a way to do it?
Alex
Have you solved this?
It would be really nice if the $('#grid1').igGridSelection('selectRow', i) would automatically scroll the new selected row into the visible area.
Thanks, scrolling does work! However how can I find that specific record is outside the visible part of the grid and I really need to scroll the grid to select it ? If the record is visible, I can just select it, something like:
$('#grid1').igGridSelection('selectRow', i);
Now when I scroll to the visible record, grid first scrolls to it and the record became top record of the visible grid, then it scrolls back, record jumps to the previous place and became selected.
Hey,
as i have pointed out in a previous post, the primary key is encoded in every TR, in a data-id attribute. it doesn't matter how the property holding the primary key is named, it is not used as an attribute. all HTML attributes are prefixed with data-* in order to be W3C compliant.
$("#grid1_scroll").scrollTop($("#grid1").find("tr[data-id='<primary key value>']").first().position().top);
instead of:
$("#grid1_scroll").scrollTop($("#grid1").find("tr[timestamp='<primary key value>']").first().position().top);
Hope it helps. Thanks,
Angel
Sorry, it does not work for me. I have primaryKey: "timestamp" set and when I try to scroll to row if it's necessary:
var searchStr = "tr[timestamp='" + strTime + "']";
$("#grid1_scroll").scrollTop($("#grid1").find(searchStr).first().position().top)
I receive an error message: Microsoft JScript runtime error: Unable to get value of the property 'top': object is null or undefined
In debugger I see that $("#grid1").find(searchStr).first().position() is null...