在ext 的grid中查找 将结果显示到grid中 多次查找结果叠加(不清空上次的查找结果)?

解决方案 »

  1.   

    后台在LIST的基础上追加
    比如list = list.where(p=>p.test ==test)
    这么个思路
      

  2.   


    grid.store.add(Ext.data.Record[] records)
      

  3.   

    ,'','-','',{
                text:'搜 索',
                id:'sousuo_fc',
                pressed:true,
                tooltip:"关键字:送达站/货号/货物名称",
                iconCls:'serchopenroomrecord',
                listeners:{'on':function(val){Ext.getCmp("daizhuang").focus(true,true);}},
                handler: Serachdaizhuang
            }serachdaizhuang()方法代码如下
     function Serachdaizhuang()
        {
            var daizhuang = Ext.get('daizhuang').dom.value;
            
            firstGridStore.reload
            ({
                    params:{start:0,limit:pageSize,msg:daizhuang}
                    
            });
            
            firstGrid.getSelectionModel().selectAll();//此行的意思是查询到结果后将其高亮显示并勾选,但是第二次查询的结果会把第一次查询的结果清空掉 ,怎么保留多次查询的结果在同一个grid中      
        }以下是后台查询代码 public DataSet GetdaizhuangAll(string message)
            {
                try
                {
                    ds = sqlhelper.GetDataSet("select * from jydxx,hwxx where jydxx.jydbh = hwxx.jydbh and hwzt='1' and (sdzmc like '%'+'" + message + "'+'%'  ) and jydxx.jydbh = hwxx.jydbh and hwzt='1' ");
                    return ds;
                }
                catch (Exception)
                {                throw;
                }        }