1. #1
    Sencha User
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    56
    Vote Rating
    1
    Answers
    2
    DetBerlin is on a distinguished road

      0  

    Default Answered: record show on Panel

    Answered: record show on Panel


    hi Everybody,

    nothing on this subject was to be found on google... I would like a record in the list select and display data from the second array field on my panel without using a text box. is it possible? and if like? here an example how I thought it... Unfortunately it works not...


    PHP Code:

    Ext
    .onReady(function() {
      var 
    XPZus Ext.get('mitte').getX(); var YPZus Ext.get('mitte').getY();
      
    Ext.create('Ext.data.Store',{storeId:'zusSource'fields:['stftxt01''stftxt02'],
      
    proxy:{type:'ajax'url:'phfoods.php?fodWahlen=1'}, autoLoad:true});
      
    var 
    gridForm Ext.create('Ext.form.Panel',{border:falselayout:'column'x:8y:10width:674bodyStyle:'background:#e1e1e6;',
     
    items:[{xtype:'grid',  width:274height:404store:Ext.data.StoreManager.lookup('zusSource'), enableColumnMove:falseenableColumnResize:falsesortableColumns:false,
      
    columns: [{text:'Artikelbezeichnung'componentCls:'wbGrids2'width:255hideable:falsedataIndex:'stftxt01'}],
    defaults:{flex:1overflowY:'scroll'},
      
    listeners:{selectionchange:function(modelrecords) {if (records[0]) {this.up('form').getForm().loadRecord(records[0]);}}},
      },{
      
    xtype:'panel'id:'test2',  x:8width:392height:404
      
    }]});
      var 
    zusWindow Ext.create('Ext.window.Window',
      {
    title:'Zusatzstoffe'modal:trueresizable:falseshadow:falsedraggable:falsex:XPZus + ((743 702) / 2), y:YPZus + ((666 456) / 2), width:702,
      
    height:456bodyStyle:'background:#e1e1e6;'items:gridForm}); zusWindow.show();
    }) 
    i hope you can help me

    detberlin

  2. thanks for you solution,

    i have found other way....
    and it works.....

    in the next time follow example.

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,118
    Vote Rating
    30
    Answers
    85
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    You can do something with templates like this

    Code:
    var tplMarkup = [
            '<b>{field1}<br/>',
            '<b>{field2}<br/>',
            ];
    
    var tpl = Ext.create('Ext.Template', tplMarkup);
    tpl.overwrite(myPanel.body, records[0].data);

  4. #3
    Sencha User
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    56
    Vote Rating
    1
    Answers
    2
    DetBerlin is on a distinguished road

      0  

    Default


    thanks for you solution,

    i have found other way....
    and it works.....

    in the next time follow example.

Thread Participants: 1