Jun 05, 2010, 10:43 AM
How do I bind parameters in a imageCommandColumn to a datastore?
I have a datagrid with a imageCommandColumn however the the image, command and tooltip are dependent on the data type for the row. I have created extra fields in my data store to handle the imageCls, text and tooltip-text properties but I am struggling to find a way to bind these values into the column.
Is this possible.
suedo code example
Is this possible.
suedo code example
<ext:gridpanel hideborders="true"
id="grdDataView"
runat="server"
title="Data View"
striperows="true"
columnlines="true"
>
<store>
<ext:Store runat="server" id="strData">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="StatusCommand" type="String"></ext:RecordField>
<ext:RecordField Name="StatusIcon" type="String"></ext:RecordField>
<ext:RecordField Name="StatusClass" type="String"></ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</store>
<columnmodel>
<Columns>
<ext:ImageCommandColumn ColumnID="StatusCommand">
<Commands>
<ext:ImageCommand IconCls="{StatusClass}" Text="{StatusText}"
CommandName="{StatusCommand}"></ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
</Columns>
</columnmodel>
</ext:gridpanel>