大致是这样的:我的页面中有个EXT.net的store控件,控件上要求有个可以对数据进行模糊查询的按钮,
       加载时store控件显示所有数据,若对数据进行模糊查询,store控件则显示查询后的结果,我现在后台可以获取到
查询的结果,可就是无法让store显示,(查询后还是显示之前所有的数据)

解决方案 »

  1.   

    &<%**%>参数传了没
      

  2.   

    前台代码:
      <ext:Store ID="Store1" runat="server" OnRefreshData="InfoBind" AutoLoad="true" AutoDataBind="true" PruneModifiedRecords="true">
      <Proxy>
      <ext:PageProxy AutoDataBind="true" />
      </Proxy>
      <Reader>
      <ext:JsonReader IDProperty="Id">
      <Fields>
      <ext:RecordField Name="Id" />
      <ext:RecordField Name="MenuName" />
      <ext:RecordField Name="IsDel" />
      <ext:RecordField Name="Orderby" />
      </Fields>
      </ext:JsonReader>
      </Reader>
      </ext:Store>  <ext:Button ID="Button5" runat="server" Text="查找" Icon="Find">后台代码:
      //绑定所有
      protected void InfoBind(object sender, StoreRefreshDataEventArgs e)
      {
      BusinessBasisMenu menu = new BusinessBasisMenu();  IList<BasisMenu> list = menu.GetList<BasisMenu>;
      Store1.DataSource = list;
      Store1.DataBind();
        
      }
      /// <summary>
      /// 查找方法
      /// </summary>
      /// <param name="sender"></param>
      /// <param name="e"></param>
      protected void BtnSelect_Click(object sender, DirectEventArgs e)
      {
        
      if (this.txtSelect.Text != "")
      {
      //string sql = "";
      string sql = " from BasisMenu where 1=1";
      sql += " and MenuName like '%" + txtSelect.Text.Trim() + "%'";
      BusinessBasisMenu menu = new BusinessBasisMenu();
      IList<BasisMenu> list = menu.Find(sql);
      Store1.DataSource = list;
      Store1.DataBind();
      }
      else
      {
      X.Msg.Notify("提示", "<font color='green'>请您输入要查询的内容!</font>").Show();
      }
      }