subgrid value with form submit

How can we get the values of subgrid in server side code,now we are getting only the main grids values as parameters(that too the first row value is missing )
We are using Dhtmlx2.5 Suite prof version

We have a main grid with subgrid on it similar to the following code

mainGrid = new dhtmlXGridObject("adjustment_grid"); mainGrid.imgURL = "${str_applicationPath}/common/dhxGrid/codebase/imgs/"; mainGrid.setHeader(headerContent); mainGrid.setInitWidthsP("4,36,14.5,15,15,15,0,0,0,0,0,0");"); mainGrid.setColTypes("sub_row_grid,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro"); mainGrid.setSkin("dhx_skyblue"); mainGrid.setColSorting("str,str,int,date,int,str,int,int,str,str,str,str"); mainGrid.setColAlign("left,left,center,right,right,right,left,center,left,left,left,left"); mainGrid.setColumnHidden(6,true);mainGrid.setColumnHidden(7,true);mainGrid.setColumnHidden(8,true); mainGrid.setColumnHidden(9,true);mainGrid.setColumnHidden(10,true);mainGrid.setColumnHidden(11,true); mainGrid.enableAutoHeight(true); mainGrid.init(); mainGrid.attachEvent("onSubGridCreated",function(subgrid,rowId,cell_index){ loadAdjustmentValues(subgrid,rowId,cell_index); return false; });

function loadAdjustmentValues(subgrid,rowId,cell_index){
subgridArray[rowId] = subgrid;
subgridArray[rowId].setInitWidthsP(“21,5,10,10,10,14,10,20,0”);
subgridArray[rowId].setHeader("

<s:text name=‘showAdjustPg.grid.label.header.adjDesc’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjPax’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjRate’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjCharge’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjCommn’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjType’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjAmt’/>
,
<s:text name=‘showAdjustPg.grid.label.header.adjCmt’/>
,");
subgridArray[rowId].setColAlign(“right,center,right,right,right,center,right,left,left”);
subgridArray[rowId].setColTypes(“ro,ro,ro,ro,ro,coro,edtxt,txt,ro”);
subgridArray[rowId].setSkin(“dhx_skyblue”);
subgridArray[rowId].setColSorting(“str,int,str,str,str,str,str,str,str”);
//subgridArray[rowId].enableEditEvents(true,true);
subgridArray[rowId].setColumnHidden(8,true);
subgridArray[rowId].init();
subgridArray[rowId].attachEvent(“onEditCell”,function(stage,rId,cInd,nValue,oValue){
if(stage==2 && rId != null && cInd != null && cInd==6 && nValue.length>0){//for amount checking
return validateAdjustmentAmount(nValue,rId,cInd,rowId);
}
if(stage==2 && rId != null && cInd != null && cInd==5 && nValue.length>0){//for Adjustments Types DDLB
return modifyDescription(nValue,rId,cInd,rowId);
}
return true;
});
combobox = subgridArray[rowId].getCombo(5);
combobox.put(comboDefaultVal,“Select Any”);
combobox.put(“o”,“0”);
var mainGridSvcNum	= mainGrid.cells(rowId,6).getValue();
var mainGridSvcCod	= mainGrid.cells(rowId,7).getValue();
var mainGridlinkCod	= mainGrid.cells(rowId,8).getValue();
var mainGridSvcName	= mainGrid.cells(rowId,1).getValue();
var inCount = 0;

	<s:iterator value="adjustmentDetailsList" status="s_adjustmentDetailsList">
for(var i=0 i i <10 ; i++_{
		var adjSvcNum	= "adj"+i;
		var adjSvcCod	= "cod"+i;
		var linkCod		= "link"+i;
		
		if((adjSvcNum==mainGridSvcNum) && (adjSvcCod==mainGridSvcCod) && linkCod==mainGridlinkCod){
			var adjSvcSName	= "serveice name ";
			adjSvcSName	= adjSvcSName+"/"+mainGridSvcName;
			var subRowId	=  "sub_"+rowId+"_"+inCount;
		subgridArray[rowId].addRow(subRowId,',,,,,,,',rowId+"_"+inCount);
	    	subgridArray[rowId].cells(subRowId,0).setValue(adjSvcSName);
	    	subgridArray[rowId].cells(subRowId,1).setValue("");
	    	subgridArray[rowId].cells(subRowId,2).setValue("");
	    	subgridArray[rowId].cells(subRowId,3).setValue("");
	    	subgridArray[rowId].cells(subRowId,4).setValue("");
	    	subgridArray[rowId].cells(subRowId,5).setValue("");
	    	subgridArray[rowId].cells(subRowId,6).setValue("");
	    	subgridArray[rowId].cells(subRowId,7).setValue("");
	    	subgridArray[rowId].cells(subRowId,8).setValue(linkCod);
	    	subgridArray[rowId].setRowColor(subRowId, "#D9D9D9");
	    	inCount++;
		}
	}

}

for(var openRow=0;openRow<mainGrid.getRowsNum();openRow++){
mainGrid.cells(openRow,0).open();
if(subgridArray[openRow].getRowsNum()<1){//check to see if any adjutment exists
mainGrid.cells(openRow,0).close();
}
}

if possible provide a sample of subgrid with data loading similar to above and how to save ii with form

thanks…

some one plz …

You should create dhtmlxDataProcssor object for each sub grid.
Sub grid object is created after you open sub grid row first time
docs.dhtmlx.com/doku.php?id=dhtm … gridloaded
docs.dhtmlx.com/doku.php?id=dhtm … b_row_grid

BTW it would be easylier to use dhtmlxTreeGrid. In such you should initialize only one DataProcessor for treeGrid.

Thanks for the reply…

i will try it with dataprocessor.i want to repeat my earlier question regarding dataprocessor
( viewtopic.php?t=793 )

Whether it is possible to redirect to another page after data has been posted to server through dataprocessor.
what i have understood is that the grid need to get back a xml response (like the ajax reponse)

thanks again

Yep, normally grid need to get feedback from server ( it is a good practice, because it possible that there will be some error at server side, and we will need to react differently )

You can use next code

dp.attachEvent("onAfterUpdate",function(sid, action, tid, tag){ ... redirect code here ... })

where dp - instance of dataprocessor

So, when confirmation will be received, onAfterUpdate handler will be triggered and redirect will be applied.