Apr 21, 2013, 3:43 PM
[CLOSED] Gridcommand replace Icon and disable command
Hi,
I have an imagecommandcolum with a directevent on the grid.
If the directevent is fired I need to update the commandimage and disable the command. How can I do that.
and the icon don't changed.
I have an imagecommandcolum with a directevent on the grid.
If the directevent is fired I need to update the commandimage and disable the command. How can I do that.
<ext:ImageCommandColumn ID="colOrderFinished" runat="server" Width="30">
<Commands>
<ext:ImageCommand Icon="SportGolfPractice" CommandName="cmdDocumentsChecedTrue" Hidden="false" IconCls="">
</ext:ImageCommand>
<ext:ImageCommand Icon="SportGolf" CommandName="cmdDocumentsChecedFalse" Hidden="true">
</ext:ImageCommand>
</Commands>
<DirectEvents>
<Command OnEvent="cmdOrderFinished">
<ExtraParams>
</ExtraParams>
</Command>
</DirectEvents>
<Listeners>
<command Handler="finishOrder(record, command);" />
</Listeners>
</ext:ImageCommandColumn>
I tried something like that, but now the direktevent fires doesn't fires anymoreand the icon don't changed.
function finishOrder(record, command) {
column.commands(0).hidden = true;
debugger;
if (command.command == 'cmdDocumentsChecedTrue') {
command.hidden = true;
}
if (command.command == 'cmdDocumentsChecedFalse') {
command.hidden = false;
}
record.disableCommand = true;
//this.view.refreshRow(this.store.indexOf(record));
// GridPanel1.getView().refresh()
}
Thanks for help.
Last edited by Daniil; Apr 24, 2013 at 1:05 PM.
Reason: [CLOSED]