Results 1 to 2 of 2

Thread: Open Div with asp.net controls on EXTJS.Window

  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Open Div with asp.net controls on EXTJS.Window

    Hello,
    Im trying to render some div in my window modal but dont know how to do this without the html config from the Items collection ( //html: $("#divDestination").html() - This config render the HTML but dont allow my Asp.Net Events )
    I want to migrate all my modals to extJS but this is just possible if my Divs render correct on to the window.

    Code:
    <script type="text/javascript">
            Ext.require([
        'Ext.tab.*',
        'Ext.window.*',
        'Ext.tip.*',
        'Ext.layout.container.Border']);
            /*Ext.onReady(function () {
            var win,    */
    
    
            function abreModal() {
                var win;
                win = Ext.create('widget.window', {
                    applyTo: 'divDestinacao',
                    title: 'Selecione a Destinao',
                    header: {
                        titlePosition: 2,
                        titleAlign: 'center'
                    },                
                    closable: true,
                    closeAction: 'hide',
                    width: 600,
                    minWidth: 350,
                    height: 350,
                    tools: [{ type: 'pin'}],
                    layout: {
                        type: 'border',
                        padding: 5
                    },
                  items: [{
                        region: 'center',
                        split: true,
                        collapsible: false,
                        floatable: false                     
                        //html: $("#divDestination").html()
                    }]
                });
    
    
                //button.dom.disabled = true;
                if (win.isVisible()) {
                    win.hide(this, function () {
                        //button.dom.disabled = false;
                    });
                } else {
                    win.show(this, function () {
                        //button.dom.disabled = false;
                    });
                }
            }        
            //);
            // });
        </script>
    My DIV:
    HTML Code:
    <div id="divDestination">
          Hello World<br />
          <asp:button id="btnClick1" runat="Server" text="tryMe" OnClick="btnClick1_Click" />
    </div>

  2. #2
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default

    You can use contentEl:
    http://docs.sencha.com/extjs/4.2.0/#...-cfg-contentEl

    Code:
    items: [{
        region: 'center',
        split: true,
        collapsible: false,
        floatable: false,
        contentEl: 'divDestination'
    }]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •