Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Tooltip for grid cell data (Razor)

$
0
0

Thanks! This got me started in the right direction. I'm stuck though on trying to fit the example into the Razor syntax for the .Content member. Razor doesn't like the in-line function I'm trying to define and I haven't been able to find an example of the .Content member being defined with an in-line function. I'm thinking perhaps that the way to go is with .Event but how do I get the cell data if I go that way?

Here's the example I'm trying to emulate followed by my non-working experiment:

  $("#grid").kendoTooltip({
    filter: "td:nth-child(2)", //this filter selects the second column's cells
    position: "right",
    content: function(e){
      var dataItem = $("#grid").data("kendoGrid").dataItem(e.target.closest("tr"));
      var content = dataItem.Text;
      return content;
    }
  }).data("kendoTooltip");
});

.

@(Html.Kendo().ToolTip()
    .For("TranGrid_#=BatchID#")
    .Filter("td:nth-child(3)")
    //.Content(@functions{ function(e){ return "test"; } } )
    .Position("right")
    .Width("500px")
    .AutoHide("true")
//.Events(e => e
//    .Show("tooltip_show")
)

Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>