0

Hi i want add component in grid i try to do this Rendering a component into an ExtJS grid but i saw in cell and button under grid

I use ExtJs 4

    columns:[
      {header:"test", dataIndex:'registrationDate', width:30, renderer:function (value, id, r) {
            var id = Ext.id();
            new Ext.Button({
                text:"1", handler:function (btn, e) {
                    // do whatever you want here
                }
            }).render(document.body, id);

            return('<div id="' + id + '"></div>');
        }}
    ],
Community
  • 1
  • 1
yaroslavTir
  • 711
  • 2
  • 10
  • 22

1 Answers1

0

If you just need the buttons with click handler in the columns use the actioncolumn xtype.

dbrin
  • 15,525
  • 4
  • 56
  • 83