Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Extract values from Hidden Columns?

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

Extract values from Hidden Columns?
Link Posted: 07-Sep-2005 12:15
I am trying to use 30+ hidden columns in a virtual grid, so that I can present the data in a separate detail grid when a user clicks on a node. However, I can't seems to extract the data from the hidden columns.

Here is the return value from the Immediate window for a visible column...

?node.FlyGrid.Columns.GetColumnFromCellIndex(1).GetValue(node)
"NAS1149 - WSHR, FLAT" {String}
    String: "NAS1149 - WSHR, FLAT"


When I try to get values from a hidden column (which has values) I get the message:

?node.FlyGrid.Columns.GetColumnFromCellIndex(3).GetValue(node)
Referenced object has a value of 'Nothing'.


Any ideas?

Thanks in advance!
Link Posted: 07-Sep-2005 16:24
Columns.GetColumnFromCellIndex returns value from visible cells of columns.
This not a better way to find column, as column can be moved/reordered, it will be better to get column on its FieldName: Columns.GetColumnFromFieldName.
BTW: you can store extra values in node without addition of hidden columns.  If grid has 3 columns, you can store 'unvisible' data in node.Value and extract hidden data based on fixed index:
'create new node with hidden data defined
Dim node as New Node(new object(){1,2,3, "UnvisibleData!"})

'extract hidden data
Dim nodeValue as Object() = CType(someNode.Value, Object())
Dim someHiddenData = nodeValue(4)