Spread Silverlight Documentation
IsColumnBound Method
Example 


The column index.
Gets whether the specified column is bound to a data source.
Syntax
'Declaration
 
Public Function IsColumnBound( _
   ByVal column As System.Integer _
) As System.Boolean
'Usage
 
Dim instance As Worksheet
Dim column As System.Integer
Dim value As System.Boolean
 
value = instance.IsColumnBound(column)
public System.bool IsColumnBound( 
   System.int column
)

Parameters

column
The column index.

Return Value

true if the column is bound; otherwise, false.
Example
This example uses the IsColumnBound method.
public class lname
        {
            public string last { get; set; }
            public int val { get; set; }
            public lname(string last, int val)
            {
                this.last = last;
                this.val = val;
            }
        }

lname[] arr = new lname[] { new lname("Smith", 100), new lname("Fender", 3), new lname("Gill", 5) };
GcSpreadSheet1.Sheets[0].DataSource = arr;
GcSpreadSheet1.Sheets[0].BindDataColumn(1, "last");
GcSpreadSheet1.Sheets[0].BindDataColumn(0, "val");
TextBox1.Text = GcSpreadSheet1.Sheets[0].IsColumnBound(0).ToString();
Public Class lname
        Public Property last() As String
            Get
                Return m_last
            End Get
            Set(value As String)
                m_last = Value
            End Set
        End Property
        Private m_last As String
        Public Property val() As Integer
            Get
                Return m_val
            End Get
            Set(value As Integer)
                m_val = Value
            End Set
        End Property
        Private m_val As Integer
        Public Sub New(last As String, val As Integer)
            Me.last = last
            Me.val = val
        End Sub
    End Class

Dim arr As lname() = New lname() {New lname("Smith", 100), New lname("Fender", 3), New lname("Gill", 5)}
GcSpreadSheet1.Sheets(0).DataSource = arr
GcSpreadSheet1.Sheets(0).BindDataColumn(1, "last")
GcSpreadSheet1.Sheets(0).BindDataColumn(0, "val")
TextBox1.Text = GcSpreadSheet1.Sheets(0).IsColumnBound(0).ToString()
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Worksheet Class
Worksheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.