Free Support Forum -

Hiding Rows and column in Gridweb

Hi All,

Kindly provide how to hide the column and rows in sheet say (i.e) i need to hide rows 1 to 50 how can i do. below code is uesd to hide only 0th row.

sheet.Cells.SetRowHeight(0, new Unit(0, UnitType.Point));

But i need to hide the Row from 1 to 50

sheet.Cells.SetRowHeight(0:50, new Unit(0, UnitType.Point));




Well, I am afraid, there is no single API to hide/unhide multiple rows in a single command. You have to loop through your desired rows (1-50) and hide them accordingly, it will consume only two/three lines instead your expected one line of code.

for(int i =0; i<50;i++)
sheet.Cells.SetRowHeight(i, new Unit(0, UnitType.Point));