Hi everybody
I m try use the class CustomDragandDrop on radtreeview but i have a issue,
if i use the next example, i dont have any problem:
protected void BindRadTreeView()
{
DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(string));
dt.Columns.Add("Title", typeof(string));
dt.Columns.Add("ParentId", typeof(string));
string parentId = string.Empty;
string childId = string.Empty;
for (int i = 0; i < 2; i++)
{
parentId = Guid.NewGuid().ToString();
dt.Rows.Add(parentId, "Node" + i, null);
for (int j = 0; j < 5; j++)
{
childId = Guid.NewGuid().ToString();
dt.Rows.Add(childId, "SubNode" + i + "." + j, parentId);
}
}
this.radTreeView1.ChildMember = "Id";
this.radTreeView1.ParentMember = "ParentId";
this.radTreeView1.DisplayMember = "Title";
this.radTreeView1.DataSource = dt;
}
i can drag and drop correctly
but the problem is when i binding the Radtreeview
protected void llenatreeview1() {
dtTablas = dat.consultaBD();
DataTable dt = new DataTable();
dtCopi.Columns.Add("Id", typeof(string));
dtCopi.Columns.Add("Title", typeof(string));
dtCopi.Columns.Add("ParentId", typeof(string));
string parentId = string.Empty;
string Id = string.Empty;
string title = string.Empty;
foreach (DataRow row in dtTablas.Rows)
{
parentId = row["ParentId"].ToString();
Id = row["Id"].ToString();
title = row["Title"].ToString();
if (parentId == "")
dt.Rows.Add(Id, title, null);
else
dt.Rows.Add(Id, title, parentId);
}
radTreeView2.ChildMember = "Id";
radTreeView2.ParentMember = "ParentId";
radTreeView2.DisplayMember = "Title";
radTreeView2.DataSource = dt;
}
first is freeze and then appears the error.
when i drag and drop appears then next error:
System.StackOverflowException