in this example http://www.sencha.com/examples-dev/e...l#bufferedgrid set the selection model to CheckBoxSelectionModel.

1 - when render the grid.. the first checkbox (represent select all) appears marked...
2 - click on the first checkbox...
3 - click again in the first checkbox... will return

HTML Code:
java.lang.NullPointerException
    at com.extjs.gxt.ui.client.widget.grid.GridSelectionModel.onLastFocusChanged(GridSelectionModel.java:627)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.setLastFocused(AbstractStoreSelectionModel.java:418)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.doMultiSelect(AbstractStoreSelectionModel.java:304)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.doSelect(AbstractStoreSelectionModel.java:322)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.select(AbstractStoreSelectionModel.java:233)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.selectAll(AbstractStoreSelectionModel.java:241)
    at com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel.onHeaderClick(CheckBoxSelectionModel.java:154)
    at com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel$2.handleEvent(CheckBoxSelectionModel.java:76)
    at com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel$2.handleEvent(CheckBoxSelectionModel.java:1)
    at com.extjs.gxt.ui.client.event.BaseObservable.callListener(BaseObservable.java:178)
    at com.extjs.gxt.ui.client.event.BaseObservable.fireEvent(BaseObservable.java:86)
    at com.extjs.gxt.ui.client.widget.Component.fireEvent(Component.java:454)
    at com.extjs.gxt.ui.client.widget.grid.ColumnHeader.onHeaderClick(ColumnHeader.java:1023)
    at com.extjs.gxt.ui.client.widget.grid.GridView$7.onHeaderClick(GridView.java:1432)
    at com.extjs.gxt.ui.client.widget.grid.ColumnHeader$Head.onClick(ColumnHeader.java:391)
    at com.extjs.gxt.ui.client.widget.grid.ColumnHeader$Head.onComponentEvent(ColumnHeader.java:274)
    at com.extjs.gxt.ui.client.widget.Component.onBrowserEvent(Component.java:864)
    at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307)
    at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263)
    at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1714)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1669)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Unknown Source)