PDA

View Full Version : [CLOSED] ImageCommandColumn - change tooltip in prepare function



blueworld
Mar 20, 2013, 9:39 AM
Hello,

I have an ImageCommandColumn that shows two different icons. I am not able to change the tooltip if the second icon is set.
My ImageCommandColumn:



<ext:ImageCommandColumn ID="GeoCoded" runat="server" Width="30">
<Commands>
<ext:ImageCommand Icon="WorldNight">
<ToolTip Text="Auftrag wurde nicht geocodiert." />
</ext:ImageCommand>
</Commands>
<PrepareCommand Fn="checkGeoCode" />
</ext:ImageCommandColumn>


My prepare function:



var checkGeoCode = function (grid, command, record, row) {

if (record.data.Latitude != "") {
command.iconCls = "icon-world";
command.setTooltip("Auftrag ist geocodiert"); <- does not work
command.toolTip = "Auftrag ist geocodiert"; <- does not work
}

};


So how can I change the tooltip?

Btw. this Image does not need to be clickable and it does not trigger any function, I just need to display an Icon and tooltip in that column, is there any better way than using an ImageCommandColumn?

Regards

Daniil
Mar 20, 2013, 9:56 AM
Hello @blueworld,

Please use:

command.qtext = "new text";

blueworld
Mar 20, 2013, 10:12 AM
Thank you Daniil, thats it