Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    valueClick vs cellClick in listGrid

    Hello, is there a way to distinguish between a user clicking on a value inside a ListGrid cell vs the cellClick event which fires when there is a click anywhere inside the cell?

    #2
    What sort of "value" are you thinking of? The text or numeric content is just rendered as HTML in the cell. You could check the last event coordinates (e.g. EventHandler.getX()), and then compare it to the row and column coordinates (e.g. ListGrid.getRowPageTop()) to know the offset inside the cell, or you could build your own HTML (e.g. ListGrid.formatCellValue()) with a click handler that does what you need.

    Comment


      #3
      Yes, I'm talking about the html that is rendered in the cell. Is there a way to capture when the user clicks on that html in the cell rather then the cellClick event.

      Comment


        #4
        Yes - you would add event handlers to the parts of the HTML where you want to distinguish clicks, or, you could look at native event information and compare it to the elements you rendered (eg by giving them IDs).

        Comment

        Working...
        X