1. #1
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    etorres3 is on a distinguished road

      0  

    Default Help setting up a form/fields to display grid details

    Help setting up a form/fields to display grid details


    Hi folks!

    I am test driving the product (latest Architect). And, I am new to all of this!

    I can get detail display (of a grid panel record selection (with select or click)) to work using tpl on a blank form. However, I cant seem to be able to get details show up in a form's field(s). I have search for similar issues and cant find a good case out there. Can any one help out please? BTW, I preffer if response is along the lines of the Architect's functionality (i.e., using the inspector panel), if possible.

    Thanks in advance!

    Epi

    Ooops: here is code used:


    Ext.define('HydroWare.view.MyPanel34', {
    extend: 'Ext.panel.Panel',


    height: 725,
    width: 1029,
    layout: {
    type: 'absolute'
    },
    title: 'My Panel',
    titleAlign: 'center',


    initComponent: function() {
    var me = this;


    Ext.applyIf(me, {
    dockedItems: [
    {
    xtype: 'gridpanel',
    dock: 'left',
    frame: true,
    height: 922,
    width: 310,
    autoScroll: true,
    title: 'Employee List',
    titleAlign: 'center',
    store: 'MembersDataStore',
    viewConfig: {


    },
    listeners: {
    itemclick: {
    fn: me.onGridpanelItemClick,
    scope: me
    }
    },
    dockedItems: [
    {
    xtype: 'toolbar',
    dock: 'top',
    height: 33,
    items: [
    {
    xtype: 'button',
    height: 18,
    width: 85,
    text: 'New Employee'
    }
    ]
    },
    {
    xtype: 'toolbar',
    dock: 'top',
    layout: {
    align: 'middle',
    pack: 'center',
    type: 'hbox'
    },
    items: [
    {
    xtype: 'textfield',
    width: 284,
    fieldLabel: '',
    emptyText: 'search'
    }
    ]
    }
    ],
    columns: [
    {
    xtype: 'gridcolumn',
    dataIndex: 'MemberID',
    text: 'Member ID'
    },
    {
    xtype: 'gridcolumn',
    dataIndex: 'FirstName',
    text: 'First Name'
    },
    {
    xtype: 'gridcolumn',
    dataIndex: 'LastName',
    text: 'Last Name'
    },
    {
    xtype: 'gridcolumn',
    hidden: true,
    dataIndex: 'Img',
    text: 'Img'
    }
    ]
    }
    ],
    items: [
    {
    xtype: 'form',
    x: 50,
    y: 70,
    height: 320,
    id: 'detailPanel',
    itemId: 'detailPanel',
    width: 440,
    bodyPadding: 10,
    title: 'My Form',
    items: [
    {
    xtype: 'textfield',
    anchor: '100%',
    formBind: false,
    name: 'MemeberID',
    fieldLabel: 'MemberID'
    },
    {
    xtype: 'textfield',
    anchor: '100%',
    name: 'FirstName',
    fieldLabel: 'First Name'
    }
    ]
    }
    ]
    });


    me.callParent(arguments);
    },


    onGridpanelItemClick: function(tablepanel, record, item, index, e, options) {
    // grab a reference to the imagelPanel via itemId
    // the # in front of the id indicates that we would like to grab a reference by
    var imagePanel = this.child('#imagePanel');
    // update the detailPanel with data
    // this will trigger the tpl to become updates
    imagePanel.update(record.data);
    }


    });
    Last edited by etorres3; 15 Feb 2013 at 12:52 PM. Reason: missing code in original

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    23
    Vote Rating
    5
    bill@perdasys.com is on a distinguished road

      0  

    Default


    Here is how I do it.

    1) create a function on SELECT event
    a new function will be created
    onGridpanelSelect: function(selModel, record, index, options) {

    2) Add this code to function created.
    var pnl = this.child('#YourPanelName');
    pnl.getForm().setValues(record.data);


    My syntax may not be exact, but you should get the idea.
    Last edited by bill@perdasys.com; 15 Feb 2013 at 3:56 PM. Reason: Fix syntax

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    etorres3 is on a distinguished road

      0  

    Default


    Thanks Bill!

    I'll give it a try.

    BEST!

Thread Participants: 1

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..."