how to take values of dhtmxgrid which is open in tab using d

i have one jsp named search.jsp containing code for dhtmlktabbar like:









































tab_create.jsp and tab_maintain.jsp containing dhtmxgrid .that grid have column checkbox.i need those checkbox selection values on search.jsp.can anyone suggest me how can do this thing.Please it’s urgent.

Because you are using AJAX mode, the content of sub-pages injected directly to the main page context, so you must be able to use grid object defined in tab_maintain.jsp and use its API to get value of checkboxes. Please beware that it will be available only after second tab loaded.


so can i do it as mygridmaintain.ceelById(1,1).getValue();

or is there any other method to get selected checkbox value in grid?
please reply urgent

If you need to get IDs of all checked rows, you can use
mygridmaintain.getCheckedRows(1); //return a comma separated list of IDs



thanx!!! but i’m having problem to get grid object on search.jsp



i cannot able to perform any operation on grid which was created on tab_maintain.jsp.



i want to perform any operation on that grid in parents jsp i.e. search.jsp



 



Please help me out.



 



 



here is code for tab_maintain.jsp







var maintainGrid = null;
doInitGridForMaintain();
//Loading Grid for Maintain Tasks
function doInitGridForMaintain(){
 if( maintainGrid==null){
   maintainGrid = new dhtmlXGridObject(‘maintainPane’);
 }
 
 maintainGrid.setImagePath(“codebase/imgs/”);



 maintainGrid.setHeader("#master_checkbox, ,img:[codebase/imgs/flag.gif],Sr.#,PO #,Source,Part #,Amount,Supplier
Name,Action
Days IN,OUT,CANCEL,Facility,Buyer
Name,First
Delivery, $value to
Cancel,UnitPrice");
 //maintainGrid.attachHeader("#master_checkbox");
 maintainGrid.enableAutoHeight(false);
 maintainGrid.enableAutoWidth(false);



 maintainGrid.setInitWidths(“23,23,40,50,100,50,80,85,85,50,40,40,85,90,60,90,80”);
 maintainGrid.setColTypes(“ch,sub_row,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro”);
 maintainGrid.setColAlign(“left,left,left,left”);
 maintainGrid.setColSorting(",str,int,str,str,int,str,str,str,str,str,str,str,str,int,int");



 maintainGrid.setSkin(“MWB2”);
 maintainGrid.init();



maintainGrid.addrow(1,“0,i’m here sub_row , ,002,MWB2_111505051,0588417Z01,200,200,Mogem,Sch,Lee Jones,8/6/2006”);



}


Which version of dhtmlxTabbar you are using?
There was an issue with access to locally defined vars in case of loading script bloks through AJAX
You can add next line to your code

maintainGrid = new dhtmlXGridObject(‘maintainPane’);
window.maintainGrid = maintainGrid; //need to be added


it will made var globally available for sure. ( Or you can contact us directly at support@dhtmlx.com, we will send you latest codebase, where problem with vars visibility will be solved automatically )





thanks for that!!!



now i’m having problem in attachevent for maintainGrid…i’m using



maintainGrid.attachEvent(“onCheck”,doOnCheck());



on tab_maintain.jsp after addingrow.this event call on when grid is loaded.but i want to call this event only when i select any check box in that grid.



Please help me out!

Correct syntax is
maintainGrid.attachEvent(“onCheck”,doOnCheck);