Categories | Question details Back To List | ||
Tabbar Grid Struggle Hi, im createing a tabbar using dhtmlxtabbar latest version tabbarMain = new dhtmlXTabBar("b_tabbar","bottom"); tabbarMain.setImagePath("imgs/"); tabbarMain.setSkin("modern"); tabbarMain.loadXML("xml/tabbarNew.xml"); tabbarMain.setOnSelectHandler(my_funcMain); this is tabbarNew.xml file <?xml version="1.0"?> <tabbar href="ajax"> <row> <tab id="mttrs" width='100px' selected="true">MTTRS</tab> <tab id="msmt" width='100px'>MSMT</tab> <tab id="mtbf" width='100px'>MTBF</tab> </row> </tabbar> when tab selected i just called the method my_funcMain() function my_funcMain(idn,ido) { mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setImagePath("imgs/"); mygrid.setSkin("modern"); mygrid.init(); mygrid.loadXML("xml/"+idn+".xml"); tabbarMain.setContent(idn,"mygrid_container"); myDataProcessor = new dataProcessor("SetValue"); myDataProcessor.enableDataNames(true); myDataProcessor.setUpdateMode("rows"); myDataProcessor.setTransactionMode("POST",true); myDataProcessor.defineAction("update", function my_handler(xml_node) { myDataProcessor.setUpdated(xml_node.getAttribute("tid"),true,"updated"); tabbarMain.clearAndLoad("Read_Update_Servlet?sheetNo="+idn); return true; }); myDataProcessor.init(mygrid); return true; }; actually my requirement is assume 2 tabbars each tabbar has grid i just enter data in first tabbar gird wise second tabbar grid when i click the button the datas from grid will send to server Problem arises: i entered the data in first tabbar gird then move to second tabbar grid the first tabbar grid datas erased how i keep the values is there any possible solution ? then when i click the button the two grid datas will go to server Guide Me plz Thanks in advance S Lambert Leonard Answer posted by Alex (support) on Oct 13, 2009 01:41 Hello, there are following issues in your code: 1) grid is reloaded each time you open tab. That is why the entered data is cleared; 2) two grids, their containers and dataprocessor objects in tabs have the same names. |