This topic demonstrates how to show a footer and set its text in C1GridView at design time and programmatically.
In the Designer
Complete the following steps:
In Source View
Switch to Source view and complete the following: steps:
<cc1:C1GridView ID="C1GridView1" runat="server" DataSourceID="AccessDataSource1" AutogenerateColumns="False" ShowFooter="True">
<cc1:C1BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" FooterText="Footer">This will set the FooterText property.
In Code
Open the Code Editor and set the following properties in code:
For example, add the following code to the Page_Load event:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1GridView1.AutoGenerateColumns = False C1GridView1.ShowFooter = True C1GridView1.Columns(0).FooterText = "Footer" |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1GridView1.AutoGenerateColumns = false; C1GridView1.ShowFooter = true; C1GridView1.Columns[0].FooterText = "Footer"; |
What You've Accomplished
This example sets the footer text for the first column to "Footer".