Spread for ASP.NET 7.0 Product Documentation
SetColWidth
See Also Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > SetColWidth

Glossary Item Box

Sets a column to a specified width.

Syntax

[JavaScript]

FpSpread1.setColWidth(column, width);

Parameters

column
Integer, column index
width
Integer, number of pixels in width of column

Return Type

None

Remarks

This method sets the specified column to the specified width. The column index must be valid. The column index is zero-based, so the first column is 0. This method does not cause a postback to occur.

This method can be used to hide a column by setting the width to zero.

Example

This example sets the width of the sixth column to 240 pixels. On the client side, the script that contains the method would look like this:

JavaScript Copy Code
<SCRIPT>
  function sizeColumn() {
    FpSpread1.setColWidth(5,240);
  }
</SCRIPT>

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.