1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
    yuris is on a distinguished road

      0  

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

    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 Destinação',
                    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 - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,804
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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'
    }]

Thread Participants: 1

Tags for this Thread