0

I have a grid with first column having a template for

   columns:
        [
            {
                field: "KedocTitle", template: "<a href='#=FileRef#' 

So #=FileRef# brings the URL correctly and users can go to that page. Now I have a requirement to show that page in a big tooltip. So I added this:

  ChronGrid.table.kendoTooltip({    
        filter: "td:nth-child(1)", //this filter selects the first column
        position: "right",
        width: 900,
        height: 700,
        content: { url: "#=FileRef#"
        }
    }).data("kendoTooltip");

The result is the same page showing in the tooltip, not the URL that #=FileRef# has.

Any Idea How to do that?

Ofer Gal
  • 707
  • 1
  • 10
  • 32

1 Answers1

0

The content: { url: "#=FileRef#" } expression in this case is not evaluated dynamically in the context of the Grid cell template, that's why "#=FileRef#" is treated as the same page URL.

You have three options:

  1. Initialize a separate Tooltip instance for each table cell in the dataBound event of the Grid.
  2. Initialize one Tooltip instance and use a function for the content setting of the ToolTip. The function should return a string with the content.
  3. Use requestStart and Ajax, similar to the Loading content with AJAX
dimodi
  • 3,969
  • 1
  • 13
  • 23
  • Spoken too soon :-) Works fine with all browsers but IE 10 when the URL points to a pdf file in the same DNS name as the calling page. when the URL is outside, (like Bing) it shows fine. :-) Any idea why? – Ofer Gal Jun 20 '17 at 13:19