To populate a single cell with data when the form loads, set the grid's indexer to the data. Add the following code to the Form_Load event to set the cell text:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1(3, 2) = "Cell Text" |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1[3, 2] = "Cell Text"; |
The text Cell Text is in the fourth row, third column.