In my extjs column model, here is what i have:
new Ext.grid.ColumnModel({
columns: [
{id:'msgId',hidden: false, dataIndex: 'msgId'}
]
Now, i wish to add another column to the model and that column will be a hyperlink with text : ‘View Message Details’ and on click should call a javascript function fnMessageDetails(‘msgId’).
How to add this column to the model? Can I add a column with no dataIndex attribute?
Yes, it’s ok if you use your own renderer or templatecolumn.
You can use
rendererconfig ortemplatecolumn. For example:Here is demo