Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by kurt on Dec 10, 2008 22:53
open dhtmlx forum
How can i focus my gird from a button

Hi,team

I used the grid in my pages. One of pages is always focus the button named "set" though the page is completly loaded.
The button named "set" has a tabindex with the value "1".
But the other pages are focus my grid after the grid is loaded except this one.
I want to focus the gird when page is completly loaded.

thanks.
Answer posted by Support on Dec 11, 2008 04:20
You can try to add next code to move focus to the grid. 

dhtmlxEvent(window,"load",function(){
     mygrid.setActive(true)
     if (mygrid.getRowsNum())
             mygrid.selectCell(0,0);
});