1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    13
    Vote Rating
    1
    LuckyBlade is on a distinguished road

      0  

    Default Answered: Insert Ext component into grid cell

    Answered: Insert Ext component into grid cell


    Hello! I wanna insert Ext component, such as button or text field into grid cell. Here is simple part of code:
    Ext.create('Ext.data.Store', {
    storeId: 'simpsonsStore',
    fields: ['name', 'email', 'phone', 'test'],
    data: { 'items': [
    {'name': 'Homer', "email": "home@simpsons.com", "phone": "555-222-1244" },
    ]
    },
    proxy: {
    type: 'memory',
    reader: {
    type: 'json',
    root: 'items'
    }
    }
    });
    var id = Ext.id();
    var testGrid = Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: Ext.data.StoreManager.lookup('simpsonsStore'),
    autoRender: true,
    columns: [ {
    flex: 1,
    text: "test",
    renderer: function (value, meta, record) {
    return "<div id=" + id + "></div>";
    },
    dataIndex: "test"
    },
    { header: 'Name', dataIndex: 'name' },
    { header: 'Email', dataIndex: 'email' },
    { header: 'Phone', dataIndex: 'phone' }
    ]
    });
    var textfield = new Ext.create("Ext.form.TextField", {
    renderTo: id
    });
    testGrid.show();
    It's not working. Error : Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null. What am I doing wrong? This idea from http://www.rahulsingla.com/blog/2011...ns#comment-853


    • #2
      Sencha - Support Team scottmartin's Avatar
      Join Date
      Jul 2010
      Location
      Houston, Tx
      Posts
      8,927
      Answers
      656
      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  

    Thread Participants: 1

    Tags for this Thread

    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