Hi ,
Here is a repro for a bug, I dont think its the same as the one mentioned here: http://www.telerik.com/community/forums/aspnet-ajax/treeview/stack-overflow-on-nodeclick-after-serversidecallback.aspx
The FindNodeByValue method produces a Stack Overflow. I need a fix from Telerix as the Call Stack is inside the FindNodeByValue method and I cant see this without the pdb files, let alone change the source code...
protected void Button1_Click(object sender, EventArgs e)
{
RadTreeView1.Nodes.Clear();
RadTreeNode tn = new RadTreeNode();
RadTreeNode childNode = null;
Random rnd = new Random();
for (int i = 1; i < 2000; i++)
{
tn = new RadTreeNode();
tn.Text = i.ToString();
tn.Value = i.ToString();
RadTreeView1.Nodes.Add(tn);
}
//for this repro, I put this loop below, however in my application it is nested in the above loop.
for (int i = 1; i < 2000; i++)
{
childNode = RadTreeView1.FindNodeByValue(Convert.ToUInt32((rnd.NextDouble() -.001) * i).ToString());
tn.Text = i.ToString();
tn.Value = i.ToString();
childNode.Nodes.Add(tn);
}
To avoid the StackOverflow I was hoping to bind the treeview to a datasource, eg:
OleDbConnection dbCon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/Tree.mdb"));
dbCon.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);
RadTreeView1.DataFieldID = "NODEID";
RadTreeView1.DataFieldParentID = "PARENTID";
RadTreeView1.DataTextField = "TEXT";
However this project requires a TreeView with roughly 3600 nodes and some branches are 6 levels deep.. I cant bind since the Child and Parent IDs are NON-Unique:
1818 1819
1818 1886
1819 1820
1819 1847
1819 1875
1820 1846
1820 1821
1820 1833
1821 1831
1821 1826
1821 1827
Looking forward to your response, thanks
Jeremy
Here is a repro for a bug, I dont think its the same as the one mentioned here: http://www.telerik.com/community/forums/aspnet-ajax/treeview/stack-overflow-on-nodeclick-after-serversidecallback.aspx
The FindNodeByValue method produces a Stack Overflow. I need a fix from Telerix as the Call Stack is inside the FindNodeByValue method and I cant see this without the pdb files, let alone change the source code...
protected void Button1_Click(object sender, EventArgs e)
{
RadTreeView1.Nodes.Clear();
RadTreeNode tn = new RadTreeNode();
RadTreeNode childNode = null;
Random rnd = new Random();
for (int i = 1; i < 2000; i++)
{
tn = new RadTreeNode();
tn.Text = i.ToString();
tn.Value = i.ToString();
RadTreeView1.Nodes.Add(tn);
}
//for this repro, I put this loop below, however in my application it is nested in the above loop.
for (int i = 1; i < 2000; i++)
{
childNode = RadTreeView1.FindNodeByValue(Convert.ToUInt32((rnd.NextDouble() -.001) * i).ToString());
tn.Text = i.ToString();
tn.Value = i.ToString();
childNode.Nodes.Add(tn);
}
To avoid the StackOverflow I was hoping to bind the treeview to a datasource, eg:
OleDbConnection dbCon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/Tree.mdb"));
dbCon.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);
RadTreeView1.DataFieldID = "NODEID";
RadTreeView1.DataFieldParentID = "PARENTID";
RadTreeView1.DataTextField = "TEXT";
However this project requires a TreeView with roughly 3600 nodes and some branches are 6 levels deep.. I cant bind since the Child and Parent IDs are NON-Unique:
1818 1819
1818 1886
1819 1820
1819 1847
1819 1875
1820 1846
1820 1821
1820 1833
1821 1831
1821 1826
1821 1827
Looking forward to your response, thanks
Jeremy