Oct 06, 2013, 2:58 AM
[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.
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]