Jan 22, 2011, 3:17 PM
[CLOSED] Set up ImageCommand tooltip in prepareCommand javascript function
Hello is there a way to set (change) ImageCommand tooltip in prepareCommand function?
I know we can set it in render function ( metaData.attr= 'ext:qtip= ) but for some reason I can't do that.
See the code below: ' command.tooltip ' was a try but it looks like there's no such a property.
Any idea?
I know we can set it in render function ( metaData.attr= 'ext:qtip= ) but for some reason I can't do that.
See the code below: ' command.tooltip ' was a try but it looks like there's no such a property.
Any idea?
function prepareCommand(grid, command, record, row) {
// need to get selection state
if (command.command == 'Action') {
// need to get value from stoStatuses and depending on that to display command
value = getSelectStatus(record.data.ClientVendorID);
switch (value) {
case -1:
command.hidden = true;
command.hideMode = 'display';
case 0:
command.iconCls = 'state0';
command.tooltip = 'state 0';
break;
case 1:
command.iconCls = 'state1';
command.tooltip = 'state 1';
break;
case 2:
command.iconCls = 'state2';
command.tooltip = 'state 2';
break;
}
}
}
<ext:Column DataIndex="state" MenuDisabled="true" Sortable="false" Resizable="false" Locked="true">
<Renderer Fn="renderState" />
<Commands>
<ext:ImageCommand CommandName="Action" Cls="center" />
</Commands>
<PrepareCommand Fn="prepareCommand" />
</ext:Column>
Last edited by Daniil; Jan 24, 2011 at 1:07 PM.
Reason: [CLOSED]