gwt - How to Update Cell Table Footer Dynamically -


i trying add footer celltable , finding hard time change celltable footer dynamically able add while creating columns below

celltable.addcolumn(qty, "qty",integer.tostring(totalqty));  

this not looking for,is there way set footer cell table dynamically.any help?

you need implement custom header , add column should contain footer. example:

public class quantityfooter extends header<number> {      private final number totalqty;      public quantityfooter(number totalqty) {         super(new numbercell());         this.totalqty = totalqty;     }      public void setquantity(number totalqty) {         this.totalqty = totalqty;     }      @override     public number getvalue() {         return totalqty;     } } 

then add column:

quantityfooter quantityfooter = new quantityfooter(0); celltable.addcolumn(qty, new textheader("qty"),quantityfooter );  

when need update footer call quantityfooter.setquantity(10) , need redraw headers/footers redrawheader() , redrawfooters()


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -