Create component in JS on demand

  1. #1

    Create component in JS on demand

    Hi,
    I use many Ext.NET Windows ony my page (declared in aspx file), implicitly they are hidden/not visible and they are invoked, shown by Direct Events. Now my Direct events contain .show() method of Ext.NET.Window. The problem is, that even though windows are not rendered to DOM, JS object are created. And this makes page load longer in older browsers.
    Is there any possibility to create JS object after invocation by Direct event?

    Thanks.
  2. #2
    Hi @ambruslaco,

    You can render a Window during a DirectEvent.
    https://examples2.ext.net/#/XRender/Basic/New_Window/
  3. #3
    Is there any option to turn off automatic script generation? And then call Render() manually?
  4. #4
    I don't think so. If a control is added to a page, it will be created (creating and rendering is not the same).

    If you prefer markup instead of code behind, you can put a Window into a user control and render that user control on demand.

Similar Threads

  1. Replies: 9
    Last Post: Oct 27, 2011, 5:04 PM
  2. Replies: 3
    Last Post: May 07, 2009, 6:37 AM
  3. Create my own Coolite.Ext.Web.Component
    By echo in forum 1.x Help
    Replies: 2
    Last Post: Dec 30, 2008, 12:42 PM
  4. How to create custom client component class?
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 24, 2008, 5:17 AM
  5. Load on demand combo box
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 03, 2008, 1:39 PM

Tags for this Thread

Posting Permissions