Spread WPF Documentation
FooterRowStyle Property
Example 


The default style of the footer area.
Syntax
'Declaration
 
Public Property FooterRowStyle As TableStyleInfo
'Usage
 
Dim instance As TableStyle
Dim value As TableStyleInfo
 
instance.FooterRowStyle = value
 
value = instance.FooterRowStyle
public TableStyleInfo FooterRowStyle {get; set;}
Example
This example creates a table.
//Add data
for (var col = 1; col < 6; col++) {
    for (var row = 2; row < 11; row++) {
        GcSpreadSheet1.Sheets[0].SetValue(row, col, row + col);
    }
}

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);
tablestylerow.Background = new SolidColorBrush(Colors.Green);

GrapeCity.Windows.SpreadSheet.Data.TableStyle testtable = new GrapeCity.Windows.SpreadSheet.Data.TableStyle();
testtable.WholeTableStyle = tablestyle;
testtable.FooterRowStyle = tablestylerow;

var sTable = GcSpreadSheet1.Sheets[0].AddTable("table1", 1, 1, 10, 5, testtable);
sTable.ShowFooter = true;
//set footer value
sTable.SetColumnName(0, "Total");
//set footer formula
sTable.SetColumnFormula(4, "SUM(F3:F11)");
'Add data
For col As Integer = 1 To 5
    For row As Integer = 2 To 10
        GcSpreadSheet1.Sheets(0).SetValue(row, col, row + col)
    Next
Next

Dim tablestyle As 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)
            
Dim tablestylerow As 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)
tablestylerow.Background = New SolidColorBrush(Colors.Green)

Dim testtable As New GrapeCity.Windows.SpreadSheet.Data.TableStyle()
testtable.WholeTableStyle = tablestyle
testtable.FooterRowStyle = tablestylerow
Dim sTable = GcSpreadSheet1.Sheets(0).AddTable("table1", 1, 1, 10, 5, testtable)
sTable.ShowFooter = True
'set footer value
sTable.SetColumnName(0, "Total")
'set footer formula
sTable.SetColumnFormula(4, "SUM(F3:F11)")
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

TableStyle Class
TableStyle Members

 

 


Copyright © GrapeCity, inc. All rights reserved.