jQuery UI Widgets › Forums › Grid › How can i use jqxTooltip inside jqxGrid to get tootlip
This topic contains 5 replies, has 2 voices, and was last updated by Dimitar 9 years ago.
-
Author
-
Hi,
I want to achieve tool tip functionality inside grid cell using jqxTooltip. please help.
Hello Debashis,
Here is the solution: http://www.jqwidgets.com/community/topic/grid-tooltip/#post-46399.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
Thanks for reply!
I have seen this example earlier. But I have a requirement like in tooltip I need to show the data of other columns in the same row. So inside cellhover callback can I get the row data of other column as well?
Hi Debashis,
You can call the method getrowdata to get the values of all the cells in the row.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
I am adding tooltip something like below:
cellhover: function (element, pageX, pageY) {
var content = “<span style=’color: #000000;’>“+element.innerText+”</span>”;
/*Here also I need the other columns data of same row where I hover the mouse on cell*/
$(element).jqxTooltip({position: ‘mouse’, content: content});
}
I can not write as $(‘#jqxgrid’).jqxGrid() because I do not know the div reference id, I only have the element as parameter to callback. Also to call getrowdata I think row number is required but here I don’t have the row number.Any help?
Hi Debashis,
You can get the cell you have currently hovered (its value, row and column) using the method getcellatposition, as shown in the following example: http://www.jqwidgets.com/community/topic/tooltip-styling-for-a-grid-column/#post-49520. I.e.:
var cell = $('#jqxgrid').jqxGrid('getcellatposition', pageX, pageY); var data = $('#jqxGrid').jqxGrid('getrowdata', cell.row);
You, however, need either the grid’s id or its jQuery selection to call the methods.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.