set rowspan

I am trying to set rowspans in the grid with the below function.

THe first setRowspan works, the second doesnot

var lineMap = new Array();

lineMap[0] = 2;

function loadRowSPans()


var rowSpan = lineMap[0];

mygrid.setRowspan(1,1,2); //this works

mygrid.setRowspan(1,1,Number(rowSpan*1)); //this doeas not???


What can it be.


This is expected behaviour as you are setting rowspan to the cell which already has rowspan. Try to comment mygrid.setRowspan(1,1,2); and check out if mygrid.setRowspan(1,1,Number(rowSpan*1)); will work.