【问题标题】:extjs null data should load empty gridextjs 空数据应该加载空网格
【发布时间】:2009-11-09 22:05:58
【问题描述】:

当用户选择带有信息 (json) 的项目时,网格会按预期呈现。

但是,当返回的数据为 null 或 {"total":0,"Products":null} 时,网格会保留之前的选择。

页面是here

如果返回的数据为空,我需要将其渲染为空。

我正在加载网格如下:

    ProductsEditDataStore.baseParams.ProductTypeID =  ProductTypeID;
       ProductsEditDataStore.load({params:{start:0, limit:12}});

【问题讨论】:

    标签: javascript extjs


    【解决方案1】:

    也许你应该使用空数组而不是 null:

    {"total":0,"Products":[]}
    

    【讨论】:

      猜你喜欢
      • 2012-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-17
      • 2014-05-17
      • 1970-01-01
      相关资源
      最近更新 更多