Dhtmlx fixed width dynamic resizze of rows

Hi All,

I have a fixed grid and if i re size a column then all other columns in the grid should either shrink or expand dynamically to fit the grid width.

Is there any way to achieve this.

i tried using
dsGrid.attachEvent(“onResize”, function(cInd,cWidth,obj){
//alert(“in onResize Event cInd=”+cInd+" cWidth="+cWidth+" obj="+obj);
<%-- <%=intialColWidth%> --%>
//alert(“after setting initial width”);
var i;
for(i=0;i<=8;i++){
if(dsGrid.getColWidth(i)!= null && dsGrid.getColWidth(i)!= “undefined”){
if(/* i!=0 && */ i!=cInd )
{//alert(“Shrinking columns”);
dsGrid.setColWidth(i,dsGrid.getColWidth(i)-2);

		}
	else{
		dsGrid.setColWidth(i,dsGrid.getColWidth(i)+6);
	}
	//dsGrid.adjustColumnSize(i);
	}
}

});

but this is not working as expected

Please, try to use the following solution:

[code] mygrid.attachEvent(“onResize”, function(cInd,cWidth,obj){
var i;
var wid=0;
var gr_wid=parseInt(mygrid.entBox.style.width)
for(i=0;i<mygrid.getColumnsNum();i++)
cInd==i ? wid+=cWidth : wid+=mygrid.getColWidth(i);

        if (wid<gr_wid)
            return true;
        else
            return false;
    });[/code]