I have a button in an ext column which when clicked should sent a post request through ajax.
I am not sure how to go about it as I am pretty new to Ext.
Following is my button renderer:
statusRenderer: function(value, metaData, record, rowIndex, colIndex, store) {
var html = '<span style="color:red;">' + value + '</span>';
html += ' <button type="button" data-id=' + record.data.ad_id + '>Reaudit</input>'
return html;
}
Please point me how to:
1. Setup the click handler
2. Setup the store for doing an ajax post request
3. Updating the grid row on a successful response.
Thanks!
This is how i ended up doing it:
AuditStatusGrid.js
AuditStatusStore.js