Spread ASP.NET 17
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread.Model Namespace / DefaultSheetDataModel Class / ClearData Method
Row index of start of range to clear
Column index of start of range to clear
Number of rows to clear
Number of columns to clear
Example


In This Topic
    ClearData Method (DefaultSheetDataModel)
    In This Topic
    Removes all the data from the specified range of cells.
    Syntax
    'Declaration
     
    
    Public Overridable Sub ClearData( _
       ByVal row As Integer, _
       ByVal column As Integer, _
       ByVal rowCount As Integer, _
       ByVal columnCount As Integer _
    ) 
    'Usage
     
    
    Dim instance As DefaultSheetDataModel
    Dim row As Integer
    Dim column As Integer
    Dim rowCount As Integer
    Dim columnCount As Integer
     
    instance.ClearData(row, column, rowCount, columnCount)
    public virtual void ClearData( 
       int row,
       int column,
       int rowCount,
       int columnCount
    )

    Parameters

    row
    Row index of start of range to clear
    column
    Column index of start of range to clear
    rowCount
    Number of rows to clear
    columnCount
    Number of columns to clear
    Remarks

    As an example, suppose you wanted to clear data for the range of cells from B2 to E4. You would set the column and row parameters to 2, the rowCount parameter to 2, and the columnCount parameter to 3.

    Clearing data in the data model by calling the ClearData method clears the data, but not the formula, the cell note, or the cell tag. To clear all the data, including the formula, cell note, and cell tag, if present, use the Clear method.

    Example
    This example adds data to the first three columns. In the click event of a button the data is cleared from the first two columns.
    See Also