1. #1
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34
    Vote Rating
    0
    p3p3 is on a distinguished road

      0  

    Question Grids into Grid cell?

    Grids into Grid cell?


    Hello,

    it is possible to add a new grid control into a grid column? With the row-expander it is posible for a row, i know. But i need the grid in a column. The sreenshot below will show it with HTML only.

    regards
    p3p3

    grid.in.grid.png

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Yes, you can render grids inside grids, but there are several issues that you would need to solve:
    1. When updating and/or deleting a row the detail grid would need to be destroyed and recreated to avoid a big memory leak.
    2. There are several problems with using grids inside grids, mainly caused by events being processed by the wrong grid.

  3. #3
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34
    Vote Rating
    0
    p3p3 is on a distinguished road

      0  

    Default


    @Condor:
    Thanks for the infomation, but point two its hard.

    p3p3

  4. #4
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34
    Vote Rating
    0
    p3p3 is on a distinguished road

      0  

    Default


    damn...i can´t add a "real" grid into gird cell. i have try follow to add it with pure html.
    Code:
    // get content of the grid
    var content=gird.view.renderHeaders()+grid.view.renderBody();
    // insert content into main grid cell
    maingrid.store.getAt(1).data.company=content;
    // refesh view
    maingrid.view.refresh();
    It´s the right way to do this? Or can i add the ext control directly.

    Thanks in advance
    pepe

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    You can defer the render of the grid till after the row has rendered, e.g
    Code:
    renderer: function(v, meta){
      var id = Ext.id();
      meta.attr = 'id="' + id + '"';
      var grid = new Ext.grid.GridPanel({
        el: id,
        ...
      });
      grid.render.defer(1, grid);
    }

  6. #6
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34
    Vote Rating
    0
    p3p3 is on a distinguished road

      0  

    Default


    Thanks again Condor. It´s a good way to do this in the cm renderer function.

    p3p3

  7. #7
    Sencha User
    Join Date
    May 2010
    Posts
    16
    Vote Rating
    0
    softwareengineer is on a distinguished road

      0  

    Default


    @ Condor : Can you please paste a sample code here ? I tried to do the same but gettting "b is null" error.

  8. #8
    Sencha User
    Join Date
    May 2010
    Posts
    16
    Vote Rating
    0
    softwareengineer is on a distinguished road

      0  

    Default


    The below is the code i modified.

    header: "Volume",sortable: true,id:'volume',width: 120,// dataIndex: 'volume',
    renderer:
    function(v, meta){var id = Ext.id();meta.attr = 'id="' + id + '"';var grid = new Ext.grid.GridPanel({el: id,columns:[{header : 'Column 1'
    },{header :
    'Column 2'
    }]});grid.render.defer(1, grid);},
    //css: 'text-align:right;'
    cls:
    'volume'

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar