Spread WinRT Documentation
GrapeCity.Xaml.SpreadSheet.Data Namespace / Worksheet Class / IsRowBound Method
The row index.
Example


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

    Parameters

    row
    The row index.

    Return Value

    true if the row is bound; otherwise, false.
    Example
    This example uses the IsRowBound method.
    class item
            {
                public int Series1 { get; set; }
                public int Series2 { get; set; }
                public item(int series1, int series2) { Series1 = series1; Series2 = series2; }
            }
            item[] table = new item[3] { new item(2, 1), new item(4, 2), new item(3, 4) };
    
            private void Button_Click_1(object sender, RoutedEventArgs e)
            {
                gcSpreadSheet1.Sheets[0].DataSource = table;
                gcSpreadSheet1.Sheets[0].DataAutoHeadings = true;
                gcSpreadSheet1.Sheets[0].BindDataColumn(1, "Series0");
                gcSpreadSheet1.Sheets[0].Columns[0].DataField = "Series1";       
            }
    
    private void Button_Click_2(object sender, RoutedEventArgs e)
            {
            Boolean r;    
            Boolean c;
            string colinfo;
            //object colinfo1;
            r = gcSpreadSheet1.Sheets[0].IsRowBound(0);
            c = gcSpreadSheet1.Sheets[0].IsColumnBound(0);
            colinfo = gcSpreadSheet1.Sheets[0].GetDataColumnName(1);
            //colinfo1 = gcSpreadSheet1.Sheets[0].GetColumnDataType(1);
            listBox1.Items.Add(r.ToString());
            listBox1.Items.Add(r.ToString());
            listBox1.Items.Add(colinfo.ToString());
            //ListBox1.Items.Add(colinfo1.ToString());
                
            }
    Class item
            Public Property Series1() As Integer
                Get
                    Return m_Series1
                End Get
                Set(value As Integer)
                    m_Series1 = Value
                End Set
            End Property
            Private m_Series1 As Integer
            Public Property Series2() As Integer
                Get
                    Return m_Series2
                End Get
                Set(value As Integer)
                    m_Series2 = Value
                End Set
            End Property
            Private m_Series2 As Integer
            Public Sub New(series1__1 As Integer, series2__2 As Integer)
                Series1 = series1__1
                Series2 = series2__2
            End Sub
        End Class
        Private table As item() = New item(2) {New item(2, 1), New item(4, 2), New item(3, 4)}
    
       gcSpreadSheet1.Sheets(0).DataSource = table
       gcSpreadSheet1.Sheets(0).DataAutoHeadings = True
       gcSpreadSheet1.Sheets(0).BindDataColumn(1, "Series0")
       gcSpreadSheet1.Sheets(0).Columns(0).DataField = "Series1"
    
    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
            Dim r As Boolean
            Dim c As Boolean
            Dim colinfo As String
            'Dim colinfo1 As Object
            r = gcSpreadSheet1.Sheets(0).IsRowBound(0)
            c = gcSpreadSheet1.Sheets(0).IsColumnBound(0)
            colinfo = gcSpreadSheet1.Sheets(0).GetDataColumnName(1)
            'colinfo1 = gcSpreadSheet1.Sheets(0).GetColumnDataType(1)
            ListBox1.Items.Add(r.ToString())
            ListBox1.Items.Add(r.ToString())
            ListBox1.Items.Add(colinfo.ToString())
            'ListBox1.Items.Add(colinfo1.ToString())
        End Sub
    See Also