Home - Forums-.NET - FlyTreeView (ASP.NET) - FlyTreeView control throw an InvalidCastException on PostBack.

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

FlyTreeView control throw an InvalidCastException on PostBack.
Link Posted: 04-Jul-2011 08:01
Steps to reproduce:
1) We have some root node.
2) Add a child node throw Client Script.
3) Call the server to fix changes in the database.
4) Do PostBack (I use RadioButtonList for that).

FlyTreeView  control throw an InvalidCastException "Unable to cast object of type 'System.Int64' to type 'System.String'.".
at System.Web.UI.Page.ProcessRequestMain
at System.Web.UI.Page.ProcessPostData
at NineRays.WebControls.FlyTreeView.LoadPostData

The sample of tree view control postData:
[[1,"Node",["_5M","n50j2fx4",[]]],[2,"Node",["_5N","n50j2fx4",["_3a",true]]],[3,"_5Z",[[{"_3":"n50j2fx30","_7":"New Taxon","_8":"-1"}],"n50j2fx4",0]],[4,"Node",["_5M","n50j2fx30",[]]],[5,"Node",["_5N","n50j2fx30",["_7","Taxon1"]]],[6,"Node",["_6g","n50j2fx30",[]]],[7,"Node",["_4k","n50j2fx30",[]]],[8,"_5Z",[[{"_3":"n50j2fx30","_7":"Taxon1","_8":"-1"}],"n50j2fx4",0]],[9,"Node",["_5N","n50j2fx30",["_8",1]]],[10,"_5m",0],[11,"_5j",0]]

I have checked the same on node deleting and it works good. FlyTreeView control revision 4.3.6.117.
Link Posted: 05-Jul-2011 05:36
What is "3) Call the server to fix changes in the database."
Link Posted: 07-Jul-2011 02:20
This is callback to server, when we add this new child in database, and set value(id) from database for this node.