set focus to a grid after it loads

is there a way to set focus to the grid so that once the grid loads, the user can then immediately be able to arrow up/down in the grid?



I have a form that is bringing back data as an XML string based on filter. what I want to do is once the data comes back, that the focus then goes to the grid so the user can take action.


You can try to use the following approach to set focus the grid cell:


grid.selectCell(0,0,0,0,1);
grid._key_events[“k9_0_0”].call(grid);
grid.editStop();


Here grid is grid object. You can call this approach after xml loading




this helped, but it still didnt set focus to the grid.  so, I ended up doing this (NOTE:  I am using .NET and their scriptmanager).  things are working now.  thanks for the help.



 



mygrid.clearAll();



mygrid.parse(result);



mygrid.selectCell(0, 0, 0, 0, 1);



mygrid._key_events[“k9_0_0”].call(mygrid);



mygrid.editStop();



$get(‘gridbox’).focus(); // gridbox is the id of my

tag containing the grid.



return (false);

So… Is the problem solved ?


yes.  problem solved.



thank you.