[CLOSED] Feature Request? Visible=false, DirectEvent Visible=true. X-Render ideas.

  1. #1

    [CLOSED] Feature Request? Visible=false, DirectEvent Visible=true. X-Render ideas.

    So i have a very real desire to improve performance and only render some controls to the client when they are actually required. That is, I want to set Visible=false on a number of controls in Page_Load and upon a DirectEvent, set Visible=true, or rather, render them then.

    Generally speaking, the advise on the forums seems to be consistently to Set Visible=true and Hidden=true:
    e.g.: http://forums.ext.net/showthread.php...le-true-false)

    That doesn't solve the problem because it still affects performance impact on both the server and the client because the control is still rendered. X-Render gives me some more options.

    In your example explorer these are posed. So option 1 is I can construct Ext.Net controls manually.
    https://examples2.ext.net/#/XRender/Basic/New_Window/ or https://examples2.ext.net/#/XRender/..._Add_Children/

    That doesn't allow me to keep my control in the resources of an aspx or ascx.

    Option 2 is convert the controls I want to render later as a user control and manage a loadcontrol state in a hidden or other value.
    https://examples2.ext.net/#/XRender/...UpdateContent/ or https://examples2.ext.net/#/XRender/...rol/Lazy_Load/

    However, that doesn't really suite me all the time as some of these controls aren't significant enough to separate and it might mean a lot of work to do in every case. Moreover, some of these controls are tightly bound to the management of other controls within the same section, which means accessibility to those variables could pose a management issue.

    So I'm hoping for an option 3 whereby I can set Visible=false to prevent their initialization render, but render them in a DirectEvent in a similar fasion as they as they are done in Option 1.


    So, for instance, option 3 would be:

    I have an Ext.Net.Panel with ID="Panel1". I set it's Panel1.Visible=false in Page_Load. Later after a DirectEvent is triggered, I want to call Panel1.Render(). This would do the trick, right? Would I need to set Panel1.Visible=true before calling Render()? Of course, I'll also wish to turn off the DirectEvent that created the render to prevent it from happening again. Otherwise, it would require the post-back to hit the page again as well as some management code to tell it to skip the rerender. This falls in line with the other thread I commented on: http://forums.ext.net/showthread.php...in-code-behind


    I'd very much like to hear your recommendation how I can do this today.
    In any case, it seems to me it would be ideal if you added this strategy as an example in the X-Render section for other users to learn from since it seems to be the one glaring hole related to Lazy-render.
    Last edited by Daniil; Oct 15, 2013 at 6:39 AM. Reason: [CLOSED]
  2. #2
    Hi @michaeld,

    A Render call should be enough to render a control with an initial Visible="false" setting. So, we are turning Visible to true automatically.

    However, it doesn't actual for a control's children. I mean if you call Render for a control with Visible="false" children, they will be still Visible="false". So, you need to maintain it yourself.
  3. #3
    Quote Originally Posted by Daniil View Post
    A Render call should be enough to render a control with an initial Visible="false" setting. So, we are turning Visible to true automatically.

    However, it doesn't actual for a control's children. I mean if you call Render for a control with Visible="false" children, they will be still Visible="false". So, you need to maintain it yourself.
    Well, as most of the controls settings will need to be maintained like it's values, that's not a big deal. I have a suspicion it may be more challenging if one of the children is a user control. Still none of this will work until a DirectEvent can be disabled in a DirectEvent. I'm going to go check out your latest in SVN and see if that'll work.
    Last edited by michaeld; Oct 07, 2013 at 10:51 PM.

Similar Threads

  1. Replies: 2
    Last Post: Aug 01, 2012, 6:39 AM
  2. [CLOSED] Hidden="true" behaves as Visible="false"
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: May 28, 2012, 3:17 PM
  3. [CLOSED] how to set panel visible true/false
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 19, 2011, 3:51 AM
  4. [CLOSED] textbox visible false&true
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 16, 2009, 9:57 AM
  5. [CLOSED] tab visible false
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 02, 2009, 10:37 AM

Posting Permissions