Using dijit Tooltip in relationship grid – how to get connectId?

Hi, I want to add a dijit tooltip to a column in the relationship grid. The tooltip shall open, when elements of this specific column are selected. For a first test I used an onSelectRow Method in the corresponding RelationshipType. Currently I try to run the following sample: https://dojotoolkit.org/reference-guide/1.10/dijit/Tooltip.html
require(["dijit/Tooltip", "dojo/domReady!"], function(Tooltip){
    new Tooltip({
        connectId: ["exampleNode"],
        label: "the text for the tooltip"
    });
});
Right now I have some trouble to get the correct "connectId" for the tooltip element. Any ideas of how to use this parameter? I am already able to open a standard dijit dialog in a similar way. But the standard dialog is always placed in the middle of the screen and not connected to a certain cell position. Thanks for your help! Angela
Parents
  • Hi Angela, The connectId argument expects the id attribute of the HTML node you'd like to add the tooltip to. I was able to get the ID of a column header with the sample below in Google Chrome in 11.0 SP12. var columnHeaderId = document.selectSingleNode("//div[contains(@class, 'dojoxGridSortNode') and text() = 'YOUR_COLUMN_NAME']").parentNode.id; You should then be able to pass the result of this sample directly into your tooltip like below.
    require(["dijit/Tooltip", "dojo/domReady!"], function(Tooltip){
    new Tooltip({
    connectId: [columnHeaderId],
    label: "the text for the tooltip"
    });
    });
    Please note that the class names and general structure of the HTML of Aras Innovator can change between service packs, so you may need to modify this sample if you're not using 11.0 SP12. Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hi Angela, The connectId argument expects the id attribute of the HTML node you'd like to add the tooltip to. I was able to get the ID of a column header with the sample below in Google Chrome in 11.0 SP12. var columnHeaderId = document.selectSingleNode("//div[contains(@class, 'dojoxGridSortNode') and text() = 'YOUR_COLUMN_NAME']").parentNode.id; You should then be able to pass the result of this sample directly into your tooltip like below.
    require(["dijit/Tooltip", "dojo/domReady!"], function(Tooltip){
    new Tooltip({
    connectId: [columnHeaderId],
    label: "the text for the tooltip"
    });
    });
    Please note that the class names and general structure of the HTML of Aras Innovator can change between service packs, so you may need to modify this sample if you're not using 11.0 SP12. Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data