Spread ASP.NET 17
Spread for ASP.NET 17 Product Documentation / Client-Side Scripting Reference / Scripting Members / Methods / SetColWidth
In This Topic
    SetColWidth
    In This Topic

    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 type="text/javascript">
      function sizeColumn() {
        FpSpread1.setColWidth(5,240);
      }
    </script>
    
    See Also