jQuery UI Widgets Forums Grid Cellhover not working correctly when row is clicked

This topic contains 6 replies, has 2 voices, and was last updated by  Hristo 5 years, 4 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author

  • pjain
    Participant

    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 topic was modified 5 years, 4 months ago by  pjain.
    • This topic was modified 5 years, 4 months ago by  pjain.

    pjain
    Participant

    This is the fiddle for the above question:

    http://jsfiddle.net/0v1wrmde/

    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.

    Hristo
    Participant

    Hello pjain,

    Please, take a look at this demo.
    The cellhover 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 Hristov

    jQWidgets team
    http://www.jqwidgets.com


    pjain
    Participant

    I 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.

    Hristo
    Participant

    Hello pjain,

    Please, take a look at this example
    https://www.jseditor.io/?key=jqxgrid-with-tooltip

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    pjain
    Participant

    I 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.


    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.