Hi,
I have a grid which is split at 3rd column, i.e. index=2 as below. In order to let the user scroll the grid manually and to keep both sides of the grid, i.e. the rows, such that they are aligned I have used the code as suggested here -: http://forum.dhtmlx.com/viewtopic.php?f=2&t=25401.
So the complete code is:-
function loadGrid(){
....
mygrid.enableLightMouseNavigation(true);
mygrid.init();
mygrid.moveToVisible=function(){};
mygrid.splitAt(3);
mygrid._fake.moveToVisible=function(){};
....
Now, I want to implement the functionality with which user can enter a column cell value and click on the button saying Show Row. as a result the row should be shown or selected or automatic scroll should be done and that row would be visible to user. So I have implemented a function below:-
function showRow(){
var rowToShowVal = document.getElementById("rowToShowVal").value;
var rows = mygrid.getRowsNum();
for (var i = 1; i < rows; i++) {
var cellVal = mygrid.cells(i, 1).getValue().toString();
if(rowToShowVal==cellVal){
var rowID = mygrid.getRowId(i);
mygrid.setSelectedRow(rowID);
//I have also tried mygrid.showRow(mygrid.getRowId(i)); but this does not work either.
break;
}
}
}
Now the issue is when I remove the below three lines from loadGrid() function, the showRow() function works perfectly fine, however I want this to work with the below lines of code:-
mygrid.moveToVisible=function(){};
mygrid.splitAt(3);
mygrid._fake.moveToVisible=function(){};
Please suggest how to select or show the row in grid with split mode without removing above lines of code.
Thanks,
Sam