This is a migrated thread and some comments may be shown as answers.

show tooltip only on rows that exist in my array

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ddub
Top achievements
Rank 1
Veteran
ddub asked on 29 Jun 2020, 10:45 PM

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");

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 01 Jul 2020, 11:45 AM

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.
Tags
Grid
Asked by
ddub
Top achievements
Rank 1
Veteran
Answers by
Martin
Telerik team
Share this question
or