You can load tab content from html file and automaticaly place it on page using ajax. After selecting tab2, dhtmlxGrid will be initialized in it.