Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread.Model Namespace / IDataSourceSupport Interface / IsColumnBound Method
Index of a column in the model for which to return the status

In This Topic
    IsColumnBound Method (IDataSourceSupport)
    In This Topic
    Determines whether the column is bound to a data source column.
    Function IsColumnBound( _
       ByVal column As Integer _
    ) As Boolean
    Dim instance As IDataSourceSupport
    Dim column As Integer
    Dim value As Boolean
    value = instance.IsColumnBound(column)
    bool IsColumnBound( 
       int column


    Index of a column in the model for which to return the status

    Return Value

    true if the column is bound; false otherwise
    This example binds the model to a data set.
    string strConn  = "data source =;initial catalog=Pubs; integrated security = SSPI";
    string sqlStr = "SELECT * FROM Authors; Select * From Titles";
    System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(sqlStr, strConn);
    DataSet ds = new DataSet();
    FarPoint.Web.Spread.Model.IDataSourceSupport dss;
    dss = (FarPoint.Web.Spread.Model.IDataSourceSupport)FpSpread1.ActiveSheetView.DataModel;
    dss.AutoGenerateColumns = true;
    dss.DataSource = ds;
    dss.DataMember = "Table";
    dss.DataKeyField = "auid";
    bool b;
    b = dss.IsColumnBound(2);
    Response.Write("Is column 2 bound = " + b.ToString());
    Dim strConn As String = "data source =;initial catalog=Pubs; integrated security = SSPI"
    Dim sqlStr As String = "SELECT * FROM Authors; Select * From Titles"
    Dim da As New System.Data.SqlClient.SqlDataAdapter(sqlStr, strConn)
    Dim ds As New DataSet
    Dim dss As FarPoint.Web.Spread.Model.IDataSourceSupport
    dss = FpSpread1.ActiveSheetView.DataModel
    dss.AutoGenerateColumns = True
    dss.DataSource = ds
    dss.DataMember = "Table"
    dss.DataKeyField = "auid"
    Dim b As Boolean
    b = dss.IsColumnBound(2)
    Response.Write("Is column 2 bound = " & b.ToString())
    See Also