2016-09-02 95 views
0

我在網格中加入新的記錄像下面顯示新添加的記錄爲髒即紅色頂部

var newRow = Ext.create(gridModel); 
    rowEditPlugin.cancelEdit(); 
    gridStore.insert(0, newRow); 
    reportGrid.getView().refresh(); 
    reportGrid.getView().getSelectionModel().select(0); 
    //rowEditPlugin.startEdit(0); 
    rowEditPlugin.startEditByPosition({ 
     row: newRow, 
     column: 0 
    }); 

我想顯示這個新添加的記錄爲髒,用戶應該知道,此行被添加新的即每列上方的紅色標記。

回答

0

您可以向網格的viewConfig提供一種方法,稱爲getRowClass。這種方法將允許你customise the CSS class for the row

你可以和判斷你的記錄是新插入或不使用Model#phantom property

,最後,你可以修改CSS使用SASS /時尚改變你新添加的行的外觀您的應用程序。

相關問題