Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Peter Jonkman on Oct 08, 2008 02:49
open dhtmlx forum
selectRowById selects row but doesn't scroll?

I have the following code:

    mygrid2.loadXML(url, function() {
        if(rowSelect != 0) {
            mygrid2.selectRowById(rowSelect);
        }
    });

This works (the row is selected) but the grid does not scroll to the selected row. How can I solve that?
Answer posted by Support on Oct 08, 2008 03:55
The problem can't be reconstructed with latest code, so the problem can be caused by usage of old codebase. In any case you can force row showing by adding next command. 
             grid.showRow(rowSelect);
Also the next situations may cause problem
- grid is hidden on moment of command call - in such state grid can't set correct scroll position
- the command ajust scroll of grid only, if you have some other scrolls ( scroll of page for example ) - they will not be adjusted
Answer posted by Peter Jonkman on Oct 08, 2008 06:46
Thanks for the proposed solution. It appears that using the Smart Rendering feature caused the problem. I've disabled it and it is now working.
Answer posted by Support on Oct 08, 2008 10:16
The issue with showRow and smart rendering mode already fixed in dev. version. 
Fix will be released as part of oncoming update. If you need it ASAP - you can contact us directly at support@dhtmlx.com