我开始为我们从Webforms迁移到Blazor WebAssembly的一个项目试验devexpress Blazor网格组件。
我看到网格中的分页组件工作得很好。
但是我有这样的要求:在不分页的情况下加载所有记录,并且很难获得正确的设置。
<DxDataGrid DataAsync="@GetEmployeeStatssAsync" WIDTH="700px" VerticalScrollBarMode="ScrollBarMode.Auto"
VerticalScrollableHeight="200">
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.FullName)" Width="30px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.Batches)" Width="30px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.Lines)" Width="20px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.Units)" Width="20px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.Hours)" Width="30px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.LPH)" Width="30px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.Errors)" Width="30px" />
<DxDataGridColumn Field="@nameof(EmployeeStatResponse.EPer)" Width="30px" />
</DxDataGrid>我尝试将页面大小设置为10,000,但当我这样做时,屏幕冻结了.
<DxDataGrid DataAsync="@GetEmployeeStatssAsync(51)" WIDTH="700px" PageSize="10000"
VerticalScrollBarMode="ScrollBarMode.Auto"
VerticalScrollableHeight="200">请告诉我正确的方法是什么?
提前谢谢你。
发布于 2021-03-02 04:56:45
您可以将ShowPager、PagerAllDataRowsItemVisible、PageSize属性用于DxDataGrid。
<DxDataGrid Data="@employees" ShowPager="false" PagerAllDataRowsItemVisible="false" PageSize="10000">
<DxDataGridColumn Field="Id" AllowSort="false" Width="50px"/>
<DxDataGridColumn Field="Name" AllowSort="false" Width="50px"/>
<DxDataGridColumn Field="PhoneNumber" AllowSort="false" Width="50px"/>
</DxDataGrid>https://stackoverflow.com/questions/65763307
复制相似问题