I have a screen where I have a treeview that loads
foreach (var user in allUsers)
{
var claims = db.AspNetUserClaims.Where(c => c.User_Id == user.Id);
foreach (var claim in claims)
{
if (claim.ClaimType == ClaimTypes.Role)
{
for (int i = 0; i < UserTree.Nodes.Count; i++)
if (claim.ClaimValue == UserTree.Nodes[i].Text)
{
var userNode = new RadTreeNode(user.UserName, user.Id);
UserTree.Nodes[i].Nodes.Add(userNode);
}
}
}
}
This loads fine when I click + for the parent it expands to show the children. This all works the issue is on the NodeClick event. The very first time I click on a node it reloads the page and never runs the NodeClick Event. After this one time event everything works properly. I can expand and contract nodes and when I click on a node it rune the node click properly. It is just the initial node click after the page loads that has this behavior.
foreach (var user in allUsers)
{
var claims = db.AspNetUserClaims.Where(c => c.User_Id == user.Id);
foreach (var claim in claims)
{
if (claim.ClaimType == ClaimTypes.Role)
{
for (int i = 0; i < UserTree.Nodes.Count; i++)
if (claim.ClaimValue == UserTree.Nodes[i].Text)
{
var userNode = new RadTreeNode(user.UserName, user.Id);
UserTree.Nodes[i].Nodes.Add(userNode);
}
}
}
}
This loads fine when I click + for the parent it expands to show the children. This all works the issue is on the NodeClick event. The very first time I click on a node it reloads the page and never runs the NodeClick Event. After this one time event everything works properly. I can expand and contract nodes and when I click on a node it rune the node click properly. It is just the initial node click after the page loads that has this behavior.