Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Node.HasChildren error

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

Node.HasChildren error
Link Posted: 23-Mar-2007 13:16
When I try to use the statment \"If node.HasChildren Then...\" I get the following error.

System.InvalidCastException was unhandled
  Message=\"Unable to cast object of type 'System.Data.DataRowView' to type 'System.Data.DataViewManagerListItemTypeDescriptor'.\"
  Source=\"System.Data\"
  StackTrace:
       at System.Data.DataTablePropertyDescriptor.GetValue(Object component)
       at 7..HasChildren(NodeBase node)
       at NineRays.Windows.Forms.Data.VirtualRootNode.04(NodeBase )
       at NineRays.Windows.Forms.Data.VirtualNode.get_HasChildren()
...

Any idea why this is happening?

I'm using VS2005 v8.0 and FlyGrid v1.4.5.2
Link Posted: 27-Mar-2007 06:31
Can you provide me with more info -
- that type of dataprovider or data connection is used (SQL Server for example)?
- Is this databound mode or mixed mode?
Link Posted: 09-Apr-2007 18:31
Thanks for the sample provided, we've fixed this problem, fixed
version of FlyGrid will published to the end of this week.
I've one comment to your code:
When you specify the NestedDataMember to specify nested data member
please use DataRelation name, not the table used for nesting.
for example:
[VB.Net]
Me.fg.Columns.NestedDataMember = Me.ds.Relations(0).RelationName