Hiding controls in screens is slow during rendering and leaves empty rows RRS feed

  • Question

  • I have a Create/View/Edit screen where I show/hide controls depending on user authority and mode. I´m doing that dynamically via code using the "this.FindControl("ControlName").IsVisible = false;" syntax. The code is put inside the screens "..._Created()" method, However, when rendering the screen all controls shows up at first and then they start to hide one by one during 1-2 seconds which is an enoying effect. Is there a better way to do this?

    Another problem is that if I hide a control with the IsVisible flag an empty row is still created (I´m using the "Rows Layout") which makes the form look bad, how can I avoid this?

    Best regards


    Wednesday, August 3, 2011 7:59 AM

All replies

  • Hi Tommy,

    Did this one get resolved?

    I had a similar set up for a screen I've been working on.  The best fit solution I could find was to hide all controls that were not needed on the initial load of the screen using the IsVisible Toggle in the properties of the control rather than in code.  Then use code to make them visible when the user performs some action.  To avoid controls become visible one by one on screen, I put a collection of controls into a group and then set the group control to be visible.  This way the whole group becomes visible simultaneously.

    In regards to the empty row being left, can you set the Vertical Alignment property of the control below your empty row to "Top"?



    Monday, December 19, 2011 4:46 PM