atul <emailatulg@...> writes: > > Hello, > > Thanks for showing how to add an checkbox in the celltable header. > > I have another question in this regard. > I am showing this celltable data with checkbox header as above > as first column and > other columns as Name, Address, etc. > Also I am using SimplePager to show the data in celltable > in paginated format with pagesize 5. > > Question: > The first 5 records are shown in first page and > when the uses clicks the > checkbox header cell all the first 5 records in the celltable are selected > alongwith the checkbox header cell itself. > > On paging to next page by clicking the next page image(or icon) on the > SimplePager, the next 5 records from the celltable are shown > but the checkbox header cell remains selected (true) > as I had clicked it in the first page. > > I need the checkbox header as unchecked again (false) > when the user clicks on the > next page and new records are shown. > > SimplePager does on raise any event > on clickcing the next page image(or icon). > > Please Help > > Thanks and Regards, > atul gaikwad >
atul- I used the MyHeader class from http://snipt.net/araujo921/checkbox-in-gwt-celltable-header/ and added one more method to it: public void setValue(int column, boolean value) { this.value = value; changeValue.changedValue(column, value); } for the celltable, add loading state change handler; this way you don't have to worry about "what happens on sort (if you are doing server-side sorting)", pagination etc. table.addLoadingStateChangeHandler(new LoadingStateChangeEvent.Handler() { @Override public void onLoadingStateChanged(LoadingStateChangeEvent event) { if (event.getLoadingState().equals(LoadingState.LOADING)) { checkBoxHeader.setValue(false); } }); taha -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
