Results 1 to 2 of 2

Thread: Setting a grid cell background on click

  1. #1
    Ext User
    Join Date
    Dec 2008
    Posts
    34
    Vote Rating
    0
      0  

    Default Setting a grid cell background on click

    If you need to set a grid cell background when for example
    the user clicks on a certain cell you can use :

    Code:
    public void handleEvent(GridEvent be) {
         El test = be.getTargetEl();
         test.applyStyles("background-color: black;");
          grid.getView().getCell(be.rowIndex, be.colIndex).setInnerHTML(test.getOuterHtml());
    }
    It took me hours to put this thing working, so i hope that by posting this code, i can help someone out there.

    Noggy

  2. #2
    Ext User
    Join Date
    Dec 2008
    Posts
    34
    Vote Rating
    0
      0  

    Default

    Answering my own thread...i switched to GWT FlexTables, which are much more
    flexible when it comes to apply and remove CSS styles.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •