1

我不想使用 DevExtreme 的默认排序功能,我的数据源已经排序,当我使用组索引 DevExtreme DataGrid 将我的列作为组列时自动对其进行排序。我想停止 DevExtreme DataGrid 默认排序。请提出解决方案。

这是我的 dx-data-grid

<dx-data-grid 
    id="masterGrid"
    [dataSource]="globalLimit"
    [showBorders]="true"
    [allowColumnReordering]="true"
    [twoWayBindingEnabled]="true"
    [allowColumnResizing]="true">

   <dxo-sorting mode="none"></dxo-sorting>
     <dxi-column dataField="groupName"  [allowSorting]="false"  [autoExpandGroup]="true"  [groupIndex]="0" >  </dxi-column>
    <dxi-column dataField="d1"  > </dxi-column>
    <dxi-column dataField="d2"  ></dxi-column>
    <dxi-column dataField="d3" ></dxi-column>
</dx-data-grid>

这是我在 json 中的数据从服务器按排序顺序

 { "groupName":"test", 
  "d1":23900,  
  "d2":2200, 
  "d3":1452 
},
{ 
 "groupName":"test", 
  "d1":2562,  
  "d2":20000, 
  "d3":252150 
},
{ 
 "groupName":"test", 
  "d1":23215,  
  "d2":6256, 
  "d3":21121 
},{ 
 "groupName":"abc", 
  "d1":515,  
  "d2":2151, 
  "d3":5151 
},
 { 
 "groupName":"abc", 
  "d1":5000,  
  "d2":21510, 
  "d3":51010
}
  }

这是我的网格的屏幕截图 分组网格截图

4

1 回答 1

1

Add this code to Your table. Look on documentation to find more remote options.

<dxo-remote-operations [sorting]="true"></dxo-remote-operations>
于 2020-08-19T14:08:32.703 回答