Home - Forums-.NET - FlyTreeView (ASP.NET) - IConvertible

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

IConvertible
Link Posted: 30-Oct-2007 23:33
Error:
FlyNodeBinding was unable to bind FlyTreeNode.Value to \"ID\" data item field: Object must implement IConvertible.

I am using:
hierarchicalData , ID and parentID   = GUID

Can you offer any suggestions?
Link Posted: 31-Oct-2007 01:14
Hm, are you sure it is of type System.Guid ?

I just modified standard demo to contain additional Guid column bound to treeview:

dTable.Columns.Add(\"Value\", typeof(Guid));
then
dTable.Rows.Add(new object[] { 2, 1, \"Spices.Net\", true, Guid.NewGuid() });

All is ok.

The error you get is thrown from the follwoing code:
Convert.ChangeType(value, type);
value is your value (Guid as you say) and type is type of node.Value property (System.String).

Could you please get exact yourObject[\"ID\"].GetType().FullName?

Thanks in advance.