Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SheetView Class / IsColumnBound Method
Model column to be tested
Example


In This Topic
    IsColumnBound Method (SheetView)
    In This Topic
    Gets whether the column is bound to a data source column.
    Syntax
    'Declaration
     
    Public Function IsColumnBound( _
       ByVal column As Integer _
    ) As Boolean
    'Usage
     
    Dim instance As SheetView
    Dim column As Integer
    Dim value As Boolean
     
    value = instance.IsColumnBound(column)
    public bool IsColumnBound( 
       int column
    )

    Parameters

    column
    Model column to be tested

    Return Value

    true if the column is bound; otherwise false
    Example
    This example returns whether the specified column is bound.
    DataTable dt = new DataTable();
    DataRow dr;
    dt.Columns.Add("Test");
    dr = dt.NewRow();
    dr[0] = 1;
    dt.Rows.Add(dr);
    dr = dt.NewRow();
    dr[0] = 2;
    dt.Rows.Add(dr);
    dr = dt.NewRow();
    dr[0] = 3;
    dt.Rows.Add(dr);
    FpSpread1.Sheets[0].DataSource = dt;
    
    FarPoint.Web.Spread.SheetView sv;
    sv = FpSpread1.ActiveSheetView;
    bool b;
    b = sv.IsColumnBound(0);
    Response.Write("Is the column bound is " + b.ToString());
    
    Dim dt As New DataTable
    Dim dr As DataRow
    dt.Columns.Add("Test")
    dr = dt.NewRow
    dr.Item(0) = 1
    dt.Rows.Add(dr)
    dr = dt.NewRow
    dr.Item(0) = 2
    dt.Rows.Add(dr)
    dr = dt.NewRow
    dr.Item(0) = 3
    dt.Rows.Add(dr)
    FpSpread1.ActiveSheetView.DataSource = dt
    
    Dim sv As FarPoint.Web.Spread.SheetView
    sv = FpSpread1.ActiveSheetView
    Dim b As Boolean
    b = sv.IsColumnBound(0)
    Response.Write("Is the column bound is " & b.ToString())
    See Also