Hi EvgenyT,
I figured out a way to fix my problem. Maybe I did something incorrectly, but it might still be a flytreeview bug though.
When I was generating my nodes in my code, I by default was setting the nodes to be selectable. Then when I set the nodetypeId programatically, I assumed the nodetype attributes would determine if the node was actually selectable or not. This is where the problem was. Though the node type for the child node was set to selectable = false, in, reality it was not. That is why I was then forced to set the PostBackonSelect to false as well. Here is some demo code to illustrate.
The nodeTypeID for type2 declares CanBeSelected to be false and PostBackOnSelect to be false. I guess the question is, which takes precedence.
Place a break point in the node selected handler. If you click on the child node, nothing will happen. Then click on the parent node. Your break point should hit. If you inspect the node Type ID, it will be of the child node. Click continue, you then will get another hit on your breakpoint, and the parent node type id will be shown. You are getting 2 node selected call backs. I think this is incorrect. But I guess this is debatable. I'm not sure. Thanks for your response though.
<%@ Register Assembly="NineRays.WebControls.FlyTreeView" Namespace="NineRays.WebControls"
TagPrefix="NineRays" %>
Untitled Page
Panel
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void myMenu_Command(object sender, NineRays.WebControls.FlyContextMenuCommandEventArgs e)
{
panel.Visible = !panel.Visible;
}
protected void nodeSelected(object sender, NineRays.WebControls.FlyTreeNodeEventArgs e)
{
panel.BackColor = System.Drawing.Color.Green;
}
}
}