show tooltip only on rows that exist in my array

2 posts, 0 answers
  1. ddub
    ddub avatar
    3 posts
    Member since:
    Jun 2020

    Posted 29 Jun 2020 Link to this post

    Hello,

    Not sure if i am posting in the right place...

    Like the title says i am trying to show tooltip only on rows that exist in my array. I have a kendo grid with a checkbox, whichever checkbox the user clicks on i am storing that row in my $ctr.selectedRows[];
    The example i have below, the tooltip shows up on all rows when they go back to their selection grid. I am either missing something, doing this wrong, or both.
            $("#grid").kendoTooltip({
              show: function(e){
                $ctr.selectedRows.forEach((element) => {
           this.content.parent().css("visibility", "visible");
                })
              },
              hide:function(e){
                this.content.parent().css("visibility", "hidden");
              },
              filter: "td:nth-child(1)", //this filter selects the first column cells
              position: "center",
              content: function(e){
                var dataItem = $("#grid").data("kendoGrid").dataItem(e.target.closest("tr"));
                var content = "Currently we have " + dataItem.UnitsInStock + "  " + dataItem.ProductName +"in stock";
                return content;
              }
            }).data("kendoTooltip");

  2. Martin
    Admin
    Martin avatar
    299 posts

    Posted 01 Jul 2020 Link to this post

    Hello,

    You will find my answer to the same question in the other forum thread you opened on the subject. I suggest continuing the conversation there.

    Regards,
    Martin
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top