求Ext动态加载grid的例子

有一个grid,表头和列都是在数据库中查询到的。点击某个查询条件,grid里面重新加载根据查询条件返回的表头和内容

用gridpanel里的一个方法:
[code="java"]
reconfigure( Ext.data.Store store, Ext.grid.ColumnModel colModel ) : void
Reconfigures the grid to use a different Store and Column Model. The View will be bound to the new objects and refres...
Reconfigures the grid to use a different Store and Column Model. The View will be bound to the new objects and refreshed.
Parameters:

* store : Ext.data.Store
  The new Ext.data.Store object
* colModel : Ext.grid.ColumnModel
  The new Ext.grid.ColumnModel object

Returns:

* void

[/code]

设置多个columnmodule和store。
当点击查询条件时,切换cm和store。

这个问题昨天不是问过了么?

呃,多了个条件

通过调用 grid.reconfigure(ds,cm);就可以实现了 看看api就知道 很简单