My guess is that you are using a custom DataProviderAdapter with a custom AbstractPageableView. If this is the case, the workaround is to override AbstractPageableView.wrapQuery() to wrap the IQuery into an IGridQuery similar to DataGridBody.Data.wrapQuery().
I am working on a solution to solve this on the 1.5 branch. Attila 2011/7/6 Duy Do <doquoc...@gmail.com> > Hi all, > > I'm working on inmethod-grid to add a filter on top of it. Everything works > fine if I don't navigate through other pages of the grid. Once I go to other > page and filter the results, I get exception: > > java.lang.ClassCastException: > com.inmethod.grid.common.**AbstractPageableView$Query > cannot be cast to com.inmethod.grid.datagrid.**DataGrid$IGridQuery > at com.chesscom.web.common.**dataprovider.**DataProviderAdapter.query( > **DataProviderAdapter.java:82) > at com.inmethod.grid.common.**AbstractPageableView.**initialize(** > AbstractPageableView.java:222) > at com.inmethod.grid.common.**AbstractPageableView.**getItemModels(** > AbstractPageableView.java:411) > > In DataProviderAdapter.java, I found line: DataGrid grid = > ((DataGrid.IGridQuery) query).getDataGrid(); > > The current query can not be cast to IGridQuery. Is it a bug? > > Thanks, > Duy > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org> > For additional commands, e-mail: users-h...@wicket.apache.org > >