2015-12-01 87 views
0

我有一個分配dstore /內存存儲DGRID不排序

_instance = new Memory({ 
    data: { 
     identifier:'monthNumeric', 
     items: [] 
     } 
    }); 

當我點擊網格的頭,我看到的那種箭頭改變道場dgrid,但在電網不改變內容。

我追溯了代碼,看到它構建了一個排序對象。然後,它調用從_StoreMixins.js

_applySort: function() { 
     if (this.collection) { 
      this.set('collection', this.collection); 
     } 
     else if (this.store) { 
      console.debug('_StoreMixin found store property but not collection; ' + 
       'this is often the sign of a mistake during migration from 0.3 to 0.4'); 
     } 
    }, 

集合的設定似乎產生了某種功能的代碼,但它實際上並沒有執行。

這應該如何工作?

(我不知道,如果它的事項,但同店也正在與一個Dojo圖表,裹在DStoreAdapter使用。但是,這不是它如何被這裏使用)

+0

http://dgrid.io/上有一些示例演示了排序工作(包括頭版上的功能網格)。你能提供一個可運行的例子來證明它不在哪裏嗎? –

+0

在試圖創建一個jsfiddle時,我發現1.0.0和1.1.0之間的變化影響了我的代碼 – ed4becky

回答

0

dgrid 1.1。 0增加了在setCollection刷新周圍_started的檢查

因爲我從來沒有在網格上做過啓動,所以沒有設置。一旦我開始啓動,所有事情都可以按需要運行