locked
Interesting problem - Child controls lose CSS formatting when too many are added RRS feed

  • Question

  • User1587408607 posted

    Hi

    I've got quite an interesting problem with some customer server controls.

    I have four control types - RootControl, Level1Control, Level2Control, LeafControl. For simplicity they are just divs with a different background colour which display an alert when clicked.

    RootControl contains a number of Level1Control objects, which each contain a number of Level2Control objects, which each contain a number of Level3Control objects.

    Let

    • noLev1 = the number of Level1Control objects in the RootControl
    • noLev2 = the number of Level2Control objects in each Level1Control object
    • noLeaf = the number of LeafControl objects in each Level2Control object

    So if noLev1 = 3, noLev2 = 2, noLeaf = 4 then we will have one RootControl object, containing 3 Level1Control objects, which each contain 2 Level2Control objects, which each contain 4 LeafControl objects.

    No problems so far. But when there are a certain number of child controls then the grandchildren or great-grandchildren lose their CSS formatting!

    • noLev1 = 30, noLev2 = 1, noLeaf = 1 then all Level2Control and LeafControl objects lose their CSS formatting.
    • noLev1 = 29, noLev2 = 1, noLeaf = 1 then all LeafControl objects lose their CSS formatting.
    • noLev1 = 28, noLev2 = 1, noLeaf = 1 then all formatting is fine
    • noLev1 = 28, noLev2 = 2, noLeaf = 1 then all LeafControl objects lose their CSS formatting.
    • noLev1 = 27, noLev2 = 2, noLeaf = 1 then all formatting is fine
    • noLev1 = 27, noLev2 = 3, noLeaf = 1 then all LeafControl objects lose their CSS formatting.

    The problem can't be with the number of direct children in the control, or the number of total descendants. But I just can't figure it out.

    I'm totally flummoxed! Answers on a postcard greatly appreciated!!!

    Thursday, July 16, 2009 4:11 AM

All replies

  • User-2106054853 posted

     Hi,

    I could not find any clue from your description. If you could share a demo that can repro this issue I'd like to investigate further. You can upload the project to: http://skydrive.live.com/

    Monday, July 20, 2009 4:31 AM
  • User1587408607 posted

     Hi

    I've uploaded it to skydrive - my username is "Jen PT" and it's in my public folder in "AjaxLostCssTest". I've kept the directory structure which might make it a bit more difficult to download but at least you can see exactly what I'm doing then.

    I've uploaded the test application I've been using as well (part of the same VS solution). If you run it and edit the query string on the web page you can see how the css formatting changes.

    Thanks for looking at it for me

    Jen

    Monday, July 20, 2009 8:35 AM
  • User-2106054853 posted

     Hi,

    Could you post the download link here for me to test your project?

    Monday, July 20, 2009 10:22 PM
  • User1587408607 posted

    Hi I think http://cid-a71b2d8ab117c222.skydrive.live.com/home.aspx?sa=473059335&lc=2057 should work. I haven't used skydrive before so let me know if it doesn't.

    Thanks

    Tuesday, July 21, 2009 7:09 AM
  • User-2106054853 posted

     Hi,

    You can compress all files to a zip file and upload it to skydrive. Then I can download that zip file directly. Please let me know if it's done and paste the download link here.

    Tuesday, July 21, 2009 9:57 PM