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

Click inside a cell and get the content using tooltip

1 Answer 372 Views
Grid
This is a migrated thread and some comments may be shown as answers.
morteza
Top achievements
Rank 1
morteza asked on 02 Apr 2019, 09:49 AM

I have a grid which has two columns ,when i click on the first column content i want it to show me a message box,but the problem is when i click on the message box,it does not go away compeltly,the nmessage box shadow is still there ,what im doing is:

 

  $("#gridProAvail").kendoTooltip({
               filter: "td",
               content: toolTip,
               width: 400,
               height: 100,
               position: "top"
           });

         
          $("#gridProAvail").click(toolTip);

      function toolTip(e) {
         var target = $(e.target);
         if(e.target[0].cellIndex == 0) {
         var cellInfo = e.target[0].innerHTML;
         alert(cellInfo);
         grid.dataSource.read();
         }

        
i need the content to be shown in the tool tip
               
       

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 04 Apr 2019, 08:10 AM
Hi Morteza,

By default the tooltip widget will be hidden when the user clicks outside the popup. If you would like to close the tooltip on clicking inside the popup I suggest adding a few lines of code. 

Handle the Tooltip show event and in the handler get reference of the content. Then set handler for the click handler of the content element. Inside that handler call the hide() method to close the popup. 

I have prepared an example illustrating the approach:



Give it a try and let me know how it works for you.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
morteza
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or