3.2.0

How do you use tooltip with a XML datasource?

How do you do this? All the examples and code I've been testing has been against the myData array... But when you try that trick you get an Object doesn't exists error... So my question is.. Can i use XML data with tooltips and if so how do I do that?


NRJ
August 12,
First you have to add 'tooltip' property to your data model. Lets say you have tooltips as node attribute (called 'tooltip'):

table.getTooltip = function(i, j){
    var node = this.getNode(i, j);
    return node ? node.getAttribute("tooltip") : "";
};


and also add tooltip value to the title attribute of the column template:

obj.getColumnTemplate().setAttribute("title",
    function(){return this.getItemProperty("tooltip")}
);
Alex (ActiveWidgets)
August 12,
I'm not getting anything for my XML.

for "title" do I put the column label that appears on the grid, or the column label from the XML

table.setColumns(["QuoteNumber", "CustomerNumber"]);
var columns = ["Quote #", "Customer #",];


Also, where do you put the comment for your tooltip?

MSB
September 23,
I can't get the tooltip to work with XML either... ANyone??
September 27,

This topic is archived.

See also:


Back to support forum