To populate a range of cells with data when the form loads, set the Data property of the CellRange. Add the following code to the Form_Load event to set the Data property to zero:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim rng As C1.Win.C1FlexGrid.CellRange = Me.C1FlexGrid1.GetCellRange(1, 1, 3, 3) rng.Data = 0 |
To write code in C#
C# |
Copy Code
|
---|---|
C1.Win.C1FlexGrid.CellRange rng = this.c1FlexGrid1.GetCellRange(1,1,3,3); rng.Data = 0; |
The cell range fills with zeros.