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;
}
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
lname[] arr = new lname[] { new lname("Smith", 100), new lname("Fender", 3), new lname("Gill", 5), new lname("Johnson", 8) };
GrapeCity.Windows.SpreadSheet.Data.TableStyleInfo tablestyle = new GrapeCity.Windows.SpreadSheet.Data.TableStyleInfo();
tablestyle.Background = new SolidColorBrush(Colors.Azure);
tablestyle.BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(System.Windows.Media.Colors.DarkOrchid);
tablestyle.BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(System.Windows.Media.Colors.DarkSlateBlue);
tablestyle.BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(System.Windows.Media.Colors.Crimson, GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.Thick);
tablestyle.BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(System.Windows.Media.Colors.Crimson, GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.Thick);
GrapeCity.Windows.SpreadSheet.Data.TableStyleInfo tablestylerow = new GrapeCity.Windows.SpreadSheet.Data.TableStyleInfo();
tablestylerow.BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(System.Windows.Media.Colors.Crimson, GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.Thick);
GrapeCity.Windows.SpreadSheet.Data.TableStyle testtable = new GrapeCity.Windows.SpreadSheet.Data.TableStyle();
testtable.WholeTableStyle = tablestyle;
testtable.HeaderRowStyle = tablestylerow;
gcSpreadSheet1.Sheets[0].AddTable("Table1", 1, 1, arr, testtable);
gcSpreadSheet1.Invalidate();