Spread Silverlight Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / Worksheet Class / DataAutoHeadings Property

In This Topic
    DataAutoHeadings Property
    In This Topic
    Gets or sets whether to automatically generate column names for a sheet based on the data source.
    Public Property DataAutoHeadings As Boolean
    Dim instance As Worksheet
    Dim value As Boolean
    instance.DataAutoHeadings = value
    value = instance.DataAutoHeadings
    public bool DataAutoHeadings {get; set;}

    Property Value

    Boolean: true to automatically generate column names; otherwise, false.
    This example uses the DataAutoHeadings property.
    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].DataAutoHeadings = false;
    Public Class lname
        Public Property last() As String
                Return m_last
            End Get
                m_last = Value
            End Set
        End Property
        Private m_last As String
        Public Property val() As Integer
                Return m_val
            End Get
                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).DataAutoHeadings = False
    See Also