You can enhance the GcSpreadSheet component by adding a formula bar, enabling seamless interaction with various formulas and functions by associating it with a worksheet. To integrate and use the GcFormulaBar, follow the steps outlined in the Quick Start to effectively connect the two components.
The image below demonstrates how the GcFormulaBar integrates with the GcSpreadSheet component. The formula bar shows the formula applied to the cell range B2:B6, providing a clear visual representation of the formula in action.
Refer to the following example code to add a formula bar with the GcSpreadSheet component and use the SUM formula to calculate the total sales.
XAML |
Copy Code
|
---|---|
<Grid> <gss:GcFormulaBar HorizontalAlignment="Left" Margin="10,19,0,0" VerticalAlignment="Top" ShowEditingButtons="True" Expandable="True" AssociatedSpread="{x:Reference Name=spreadSheet1}"/> <gss:GcSpreadSheet Name="spreadSheet1" HorizontalAlignment="Center" Margin="10,50,0,0" VerticalAlignment="top"/> </Grid> |