Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Filling cells

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Filling cells
Link Posted: 12-Oct-2005 04:22
How can I fill cell values of nodes to a specific column?
For example I'd like to do something like: flyGrid.Rows[0].Columns["myColumn"].Value = 100;
Link Posted: 12-Oct-2005 04:29
There is several ways:
1. You can find "MyColumn" in the FlyGrid.Columns

  flyGrid.Columns.GetColumnFromFieldName(string fieldName)

and use Column.SetValue(NodeBase node) method to fill the cell of the node.
2. You can find the column:

     int cellIndex = flyGrid.Columns.GetColumnIndexFromFieldName("myColumn");

   and use NodeBase.SetCellValue:

     someNode.SetCellValue(cellIndex, 100);

to find Node in the Rows you can use FlyGrid.Rows.GetNodeFromRow:

   NodeBase someNode = flyGrid.Rows.GetNodeFromRow(0);


If you using table structure (without hierarchy) you can access to the node from row = 0 directly:

   NodeBase someNode = flyGrid.Rows.Items[0];

3. If you want to fill whole row of the node you can use Node.Value property.