1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    36
    Vote Rating
    0
    Hakkert is on a distinguished road

      0  

    Default Unanswered: ASP.NET MVC4 with extjs 4. Add partial view as panel to ext panel

    Unanswered: ASP.NET MVC4 with extjs 4. Add partial view as panel to ext panel


    Hi

    I have the following problem. I have a panel in a view

    Code:
    <scripttype="text/javascript">
        Ext.onReady(function(){
        var htmlPanel =Ext.create('Ext.panel.Panel',{
                id:'htmlpanel',
                name:'htmlpanel',
                title:'@ViewBag.Welcome',
                height:200,
                //items: [vorderingenGrid],
                renderTo:'panelTest',
                buttons:[{
                    text:'test',
                    listeners:{
                        click:function(){
    
                            $.get('/xxxxx/DetailsExtView',null,function(result){
                                //DOES NOT WORK
                                Ext.getCmp('htmlpanel').items.add(result);
                               // WORKS
                               //$('#ajaxTest').html(result);
                            });
                        }
                    }
                }]
            });
        });
    
    
    </script>
    
    <divid="panelTest"style="height:200px;"></div>
    
    <divid="ajaxTest">
    Now on the click of the button i want to add a partial view as an item to the panel.

    Code:
    @{
    Layout = "";
    }
    
    
    <scripttype="text/javascript">
    Ext.onReady(function(){
    Ext.create('Ext.panel.Panel',{
    id:'ahtmlpanel',
    name:'ahtmlpanel',
    title:'tessttt',
    height:100,
    renderTo:'test'
    });
    });
    
    </script>
    <divid="test"></div>
    I tried it without rendering it to the div and eval the result but it does not work. Anyone an idea on how to get this working.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,912
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Ext.getCmp('htmlpanel').items.add(result);
    What is the value of result?

    You should just be able to create components and add them to others c1.add(c2)

    Scott.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    14
    Vote Rating
    0
    dadaking is on a distinguished road

      0  

    Default


    Hello,

    if you have always your problem, I just have the same problem, this perhaps help you :

    Code:
    Ext.getCmp('IDPANEL').body.load({ url: 'URL TO CALL', scripts: true })

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi