Home - Forums-.NET - FlyTreeView (ASP.NET) - Control in a FlyTreeView not updating

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Control in a FlyTreeView not updating
Link Posted: 11-Dec-2007 01:08
I have a FlyTreeView with a control that consists of checkboxes:

           BorderColor="Silver" BorderWidth="1px" Height="320px" Padding="2px"
        CanBeSelected="False" SlideEffect="True" WideCell="True" ContentClickCollapses="true"
        DisableSelect="false">
                    Padding="0px;5px;0px;0px" />
        
        
        
            
            
            
            
        
        
            
                
  

        
        
        
        
        
        

                
            
        
    


If the checkboxes in MyControl are unchecked when loaded, the user can check the box and the value in the node updates and I can save the data to the database. But if the checkbox is checked when loaded, you cannot un-check the boxes. Is there some javascript or something running to prevent a checkbox from being un-checked? What else would be affecting the updating of the checkboxes? If I change the Checkboxes to Textboxes, the update works fine.

Here is the code I use to initially set the checkboxes:

    
    NineRays.WebControls.FlyTreeNode ftn =
    ftv.Nodes.FindByPath(dt.Rows[i][__MakeModelSeriesId2].ToString() +
                        dt.Rows[i][__ManufacturerId2].ToString() + "/" + dt.Rows[i]        [__MakeModelId2].ToString() + "/" + dt.Rows[i][__MakeModelId2].ToString(), true);
    if (ftn != null)
    {
    System.Web.UI.Control c = ftn.ContentContainer.Controls[1];
    System.Web.UI.WebControls.CheckBox alternate = (System.Web.UI.WebControls.CheckBox)        FindControlRecursively(c, "Alternate");
    System.Web.UI.WebControls.CheckBox refueling = (System.Web.UI.WebControls.CheckBox)        FindControlRecursively(c, "Refueling");
    System.Web.UI.WebControls.CheckBox regular = (System.Web.UI.WebControls.CheckBox)        FindControlRecursively(c, "Regular");
    System.Web.UI.WebControls.CheckBox provisional =                 (System.Web.UI.WebControls.CheckBox)
        FindControlRecursively(c, "Provisional");
    System.Web.UI.WebControls.CheckBox etopsAlternate =               (System.Web.UI.WebControls.CheckBox)
        FindControlRecursively(c, "ETOPSAlternate");
    System.Web.UI.WebControls.CheckBox polarOps = (System.Web.UI.WebControls.CheckBox)        FindControlRecursively(c, "PolarOps");

    alternate.Checked = (Boolean)dt.Rows[i][__isAlternate2];
    refueling.Checked = (Boolean)dt.Rows[i][__isRefueling2];
    regular.Checked = (Boolean)dt.Rows[i][__isRegular2];
    provisional.Checked = (Boolean)dt.Rows[i][__isProvisional2];
    etopsAlternate.Checked = (Boolean)dt.Rows[i][__isETOPSAlternate2];
    polarOps.Checked = (Boolean)dt.Rows[i][__isPolarOps2];
    }


Thanks for the help.
Link Posted: 11-Dec-2007 07:38
I just took your ASPX code, put my datasource there, modified template. And all checkboxes seem to check and uncheck as expected. Here is my code: [code] <%@ Register Assembly="NineRays.WebControls.FlyTreeView" Namespace="NineRays.WebControls" TagPrefix="NineRays" %> Untitled Page
[/code] Can you run and modify it and put the result here, so we can duplicate your problem locally. Thanks.