2
votes

How to use button instead of text as a link in a grid pannel using extjs

the following code implies a link to a different page and i need that "Fill" link to be as button... please help me anyone

    var text = 'Fill'
    if(value != undefined && value !='') {
        text = Ext.Date.format(value,'Y-m-d');
    }
    return '<span class="grid_link">'+text+'</span>';
1

1 Answers

0
votes

Try to use renderTo component attribute

return '<span class="grid_link"><div id="btn"/></span>';

...

Ext.create('Ext.Button', {
    text: 'Click me',
    renderTo: 'btn',        
    handler: function() {
        alert('You clicked the button!')
    }
});