Jul 19, 2012, 4:38 PM
[CLOSED] How to set an image into GridPanel column on the client?
Hi,
I would like to be able to change a column icon on the client. Right now, it's assigned during the column rendering as follows:
I would like to be able to change a column icon on the client. Right now, it's assigned during the column rendering as follows:
<ColumnModel runat="server">
<Columns>
<ext:Column DataIndex="ColumnIcon" MenuDisabled="true"
Sortable="false" Resizable="false" Hideable="false" Width="26">
<Renderer Fn="iconRenderer" />
</ext:Column>
</Columns>
</ColumnModel>
var iconRenderer = function (value, metadata, record) {
if (record.get("ColumnIcon") != "") {
value = String.format("<img src='{0}' />", Ext.net.ResourceMgr.getIconUrl(record.get("ColumnIcon")));
}
return value;
};
I'd like to use the iconRenderer function or some other logic to set or replace the icon after the column is rendered. Please suggest an approach.
Last edited by Daniil; Jul 19, 2012 at 5:12 PM.
Reason: [CLOSED]