GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class : AutoGenerateColumns Property |
'Declaration <DefaultValueAttribute()> Public Property AutoGenerateColumns As Boolean
'Usage Dim instance As Worksheet Dim value As Boolean instance.AutoGenerateColumns = value value = instance.AutoGenerateColumns
[DefaultValue()] public bool AutoGenerateColumns {get; set;}
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) }; public MainPage() { this.InitializeComponent(); gcSpreadSheet1.Sheets[0].AutoGenerateColumns = true; gcSpreadSheet1.Sheets[0].DataSource = table; }
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)} Private Sub MainPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded gcSpreadSheet1.Sheets(0).AutoGenerateColumns = True gcSpreadSheet1.Sheets(0).DataSource = table End Sub
Target Platforms: Windows Server 2012, Windows RT