jQuery UI Widgets › Forums › Grid › Cellhover not working correctly when row is clicked
Tagged: #jqwidgets-grid, cellhover, grid, javascript grid, jquery grid, jqxGrid ;
This topic contains 6 replies, has 2 voices, and was last updated by Hristo 5 years, 4 months ago.
-
Author
-
I have applied a custom cellhover for the grid through cellhover callback function in which I set the title attribute.I have defined rowselect as the selection mode for the grid. This works fine when mouse hovering is done in grid. Although, sometimes when I come on the page and click on a row, I am not able to see the hover on the clicked row. How can I achieve this? Also, I noticed sometimes cellhover event is triggered before rowclick, sometimes not. Thus I also want to make sure that always cellhover is triggered, so that proper attribute is visible. How to do this?
This is the fiddle for the above question:
When I click on a row, and move the mouse on the same row without moving it elsewhere, sometimes the hover with the custom text comes, sometimes not.
- This reply was modified 5 years, 4 months ago by pjain.
Hello pjain,
Please, take a look at this demo.
Thecellhover
is created to interact with one cell.
If you give me more details what you want to achieve I could try to provide you a solution.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comI am trying to set some message based on row data in tooltip using cellhover. Problem is when I click on a row, I do not see my set data but the caret sign and sometimesI see the grid’s default tooltip(I dont want to turn this off). Can you please advise how can I achieve this?
- This reply was modified 5 years, 4 months ago by pjain.
Hello pjain,
Please, take a look at this example
https://www.jseditor.io/?key=jqxgrid-with-tooltipBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comI don’t want to use the jqx tooltip, is there any way I can make the title attribute work.
Also, In above example I change the selection mode to “singlerow” and make grid non-editable, then the position of the jqxtooltip for the same row changes. So, this also doesn’t work properly.
Hello pjain,
You could use the default behavior when turned on the
enabletooltips
property.
Please, take a look at this demo.
Could you clarify what you want to achieve? Also, what you mean by this “title attribute work”?
In the example that I provide you it was created for a specific case. You could add another information there.
You could try this changes:editable: false, selectionmode: 'singlerow', cellhover: function (element, pageX, pageY) { var cell = $('#jqxgrid').jqxGrid('getcellatposition', pageX, pageY); var row = cell.row; var data = $('#jqxgrid').jqxGrid('getrowdata', row); var content = 'First Name: ' + data.firstname + ' <br>row: ' + row + '<br>' + data.productname; // update tooltip. $("#jqxgrid").jqxTooltip({ content: content }); // open tooltip. $("#jqxgrid").jqxTooltip('open', pageX + 15, pageY + 15); }
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.