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.Cells.Clear()
sheet.DataSource = _dsData
sheet.CreateAutoGenratedColumns()
sheet.DataBind()
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
Next
' Set the width of the columns.
For ColCounter As Integer = 0 To 2
cells.SetColumnWidth(ColCounter, New Unit(110, UnitType.Point))
Next
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!!!