Spread ASP.NET 18
Spread for ASP.NET 18 Product Documentation / Developer's Guide / Customizing the Appearance / Customizing the Appearance of Rows and Columns / Customizing the Number of Rows or Columns
In This Topic
    Customizing the Number of Rows or Columns
    In This Topic

    When you create a sheet, it is automatically created with three rows and four columns. You can change the number to up to two billion rows and columns.

    Using the Properties Window

    1. At design time, in the Properties window, select the FpSpread component.
    2. Select the Sheets property.
    3. Click the button to display the SheetView Collection Editor.
    4. Set RowCount and ColumnCount under the Layout section.
    5. Click OK to close the editor.

    Using a Shortcut

    Set the RowCount or ColumnCount property for the Sheets shortcut.

    Example

    This example code sets the first sheet to have 10 columns and 100 rows.

    C#
    Copy Code
    FpSpread1.Sheets[0].RowCount = 100;
    FpSpread1.Sheets[0].ColumnCount = 10; 
    
    VB
    Copy Code
    FpSpread1.Sheets(0).RowCount = 100
    FpSpread1.Sheets(0).ColumnCount = 10 
    

    Using Code

    Set the RowCount or ColumnCount property for a SheetView class.

    Example

    This example code sets the first sheet to have 100 rows and 10 columns.

    C#
    Copy Code
    FarPoint.Web.Spread.SheetView Sheet0;
    Sheet0 = FpSpread1.Sheets[0];
    Sheet0.RowCount = 100;
    Sheet0.ColumnCount = 10; 
    
    VB
    Copy Code
    Dim Sheet0 As FarPoint.Web.Spread.SheetView
    Sheet0 = FpSpread1.Sheets(0)
    Sheet0.RowCount = 100
    Sheet0.ColumnCount = 10 
    

    Using the Spread Designer

    1. Select the Settings menu.
    2. At the bottom, select the sheet for which you want to set the number of rows or columns.
    3. Select the General icon under the Sheet Settings section and change the RowCount or ColumnCount setting.
    4. Click OK.
    5. Click Apply and Exit to close the Spread Designer.