1 Reply Latest reply on Dec 7, 2007 1:09 PM by dsimpson_cs3

    Database driven tree control problems

    dsimpson_cs3
      I'm tree control which is driven by a fairly dynamic XML model. It manages categories, sub categories (any level deep) and products.

      On initial dsipaly, there will be 1 to n "top level" categories loaded into the tree. Once a top level category is expanded, I load it's sub categories via an HTTPRequest. There may be 20 to 30 sub categories for each of the top level categories. I recursively load the sub categories until I get to the products.

      I'm using the itemOpen method to determine which category I need to get the sub categories for.

      The problem that is happening is that the rendering of the tree gets very messed up. If I scroll down and back up, some of the top level categories are missing, and only some of the sub categories are shown. If I keep scrolling up and down, repeatedly, it looks different each time. If I collapse the category I opened, and reopen it, it works fine.

      It's important to note that once the node has children, I don't fetch them again, so no more changes happen directly to that node... I believe that's why it works properly once I collapse and expand it again. With that said... If I expand all categories, then close them, everything works fine afterwards...

      Has anyone experienced this kind of problem with the tree control?

      Is there a way I can block the item from expanding, then only expand it once I've set the appropriate children from XML ? Or, is there a way I request a re-render the tree?