We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Grid Height

Good Morning.

I have a problem with the height of my grid. I am able to set the height of the page with in the grid, but the grid itself is very long. I have tried a variety of methods including

grdMain.Height = New System.Web.UI.WebControls.Unit(240, System.Web.UI.WebControls.UnitType.Point)

However, this only seems to effect the page and not the grid.

I am using the following code in VB. I am using VS 2005, Aspose Grid 2.0.0:

I have included a file with a picture of the grid.

' Turn off Xhtml mode.

grdMain.XhtmlMode = False


Dim sheet As WebWorksheet = grdMain.WebWorksheets(0)

sheet.Name = "Selected Indicators"


sheet.DataSource = _dsData



Dim cells As WebCells = grdMain.WebWorksheets(grdMain.ActiveSheetIndex).Cells

For rCounter As Integer = 0 To _rowCount

cells(rCounter, 0).IsReadonly = True

cells(rCounter, 1).IsReadonly = True

cells(rCounter, 0).Style.HorizontalAlign = HorizontalAlign.Center

cells(rCounter, 1).Style.HorizontalAlign = HorizontalAlign.Center

cells(rCounter, 2).Style.HorizontalAlign = HorizontalAlign.Center

If _verifyInd = "Y" Then

cells(rCounter, 2).IsReadonly = True

End If


' Set the width of the columns.

For ColCounter As Integer = 0 To 2

cells.SetColumnWidth(ColCounter, New Unit(110, UnitType.Point))


cells.SetColumnWidth(3, New Unit(0, UnitType.Point))

grdMain.Height = New System.Web.UI.WebControls.Unit(240, System.Web.UI.WebControls.UnitType.Point)

grdMain.BottomTableStyle.Height = 0

Thank you very much for your support!!!

Never mind....I forgot to delete the DOCTYPE line in the HTML.