Spread for ASP.NET 8.0 Product Documentation
SetColumnWidth Method
Example 


Column index
Number of pixels to set the width of the column
Sets the width of the specified column in pixels.
Syntax
'Declaration
 
Public Sub SetColumnWidth( _
   ByVal column As Integer, _
   ByVal value As Integer _
) 
'Usage
 
Dim instance As SheetView
Dim column As Integer
Dim value As Integer
 
instance.SetColumnWidth(column, value)
public void SetColumnWidth( 
   int column,
   int value
)

Parameters

column
Column index
value
Number of pixels to set the width of the column
Remarks

Get the width for a column by calling the GetColumnWidth method.

Note: The value set by this method does not include the width of the adjacent grid line.

The default width for columns in the sheet is determined by the DefaultColumnWidth property.

If you prefer, you can allow users to resize columns by calling the SetColumnSizeable method.

Set the height for a row by calling the SetRowHeight method.

Example
This example illustrates the use of this member by setting the width for the specified column.
FarPoint.Web.Spread.SheetView sv;
sv = FpSpread1.ActiveSheetView;
sv.SetColumnWidth(1, 30);
Dim sv As FarPoint.Web.Spread.SheetView
sv = FpSpread1.ActiveSheetView
sv.SetColumnWidth(1, 30)
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

SheetView Class
SheetView Members
GetColumnWidth Method
SetRowHeight Method
DefaultColumnWidth Property
Width Property

User-Task Documentation

Setting the Row Height or Column Width

 

 


Copyright © GrapeCity, inc. All rights reserved.