Announcement

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

    Canvas.redraw() doesn't work ?

    Hi!
    When I try Canvas.redraw() on my ListGrid, nothing moves !
    Is it because the ListGrid is "final" ? I have to put "final", otherwise :
    "Cannot refer to a non-final variable SocieteGrid inside an inner class defined in a different method".

    Should I use another function than redraw ?
    Thanx for your help !

    Code:
    final ListGrid SocieteGrid = new ListGrid(societeListeLoader.getJsObj());
    		SocieteGrid.setWidth(1000);  
    		SocieteGrid.setHeight(200);
    		SocieteGrid.getFreezeOnLeftText();
    		societeListePanel.add(SocieteGrid);
    				
    		Button button1 = new Button();
    		societeListePanel.add(button1);
    		button1.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                	SocieteGrid.redraw();
            }
    });

    #2
    Any answer ?

    Comment


      #3
      Redraw() would have no visual effect in this case. What are you trying to do?

      Comment


        #4
        I want to refresh the ListGrid datas, to make appear the last added data.
        By the way, is it possible to add a "Edit" button into each ListGrid line ? (like the delete button)
        Thanx!

        Comment


          #5
          To refresh the grid, call invalidateCache on it. For an edit button, add a LG field and place an icon or text in a column and add a click handler.

          Comment


            #6
            Thanks a lot davidj6 ! It works perfectly !

            Comment

            Working...
            X