Announcement

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

    How to determine if a listgrid cell is disabled when clicked

    How can I determine if a listgrid cell is disabled when clicked. For example:

    getView().getHistoryListGrid().getListGrid().addCellClickHandler(new CellClickHandler() {

    @Override
    public void onCellClick(CellClickEvent event) {
    >>> is event cell disabled ??????
    }
    });

    #2
    ListGrids enable entire rows rather than cells, so you could check record.getEnabled().

    You might instead mean to check whether a cell is editable in which case call canEditCell().

    Comment


      #3
      Yes...I really want to check if the cell can be edited. I can't figure out how to get to the canEditCell() method from the cell click event. For example:

      @Override
      public void onCellClick(CellClickEvent event) {
      if(event.????.canEditCell()) {
      do something
      }

      Comment


        #4
        If you don't already have the grid in scope as a final, it could be retrieved from event.getFiringCanvas().getParentElement()

        Comment


          #5
          Thank you for your help!

          Comment

          Working...
          X