* Changed ScheduleOrdersGrid with enabling Persistence

* Added div to help with visibility on mobiles
This commit is contained in:
2025-02-19 14:01:39 +01:00
parent 3770d4f28d
commit 59e558b109

View File

@@ -2,6 +2,7 @@
@using Syncfusion.Blazor.Grids @using Syncfusion.Blazor.Grids
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100">
<SfGrid @ref="_grid" <SfGrid @ref="_grid"
TValue="ScheduleOrderDto" TValue="ScheduleOrderDto"
AllowFiltering="true" AllowFiltering="true"
@@ -10,6 +11,8 @@
AllowSelection="true" AllowSelection="true"
DataSource="@_dataSource" DataSource="@_dataSource"
EnableAdaptiveUI="true" EnableAdaptiveUI="true"
EnablePersistence="true"
AllowRowClick="true" AllowRowClick="true"
SelectionMode="GridSelectionMode.Single" SelectionMode="GridSelectionMode.Single"
QueryCellInfo="OnQueryCellInfo" QueryCellInfo="OnQueryCellInfo"
@@ -37,10 +40,13 @@
AllowSelection="true" AllowSelection="true"
TValue="ScheduleOrderDetailDto" TValue="ScheduleOrderDetailDto"
DataSource="@scheduleOrderDetails" DataSource="@scheduleOrderDetails"
EnablePersistence="true"
EnableAdaptiveUI="true"> EnableAdaptiveUI="true">
<GridColumns> <GridColumns>
<GridColumn Field=@nameof(ScheduleOrderDetailDto.Sc_productCode) HeaderText="Pozycja" Width="100"></GridColumn> <GridColumn Field=@nameof(ScheduleOrderDetailDto.Sc_productCode) HeaderText="Pozycja"
<GridColumn Field=@nameof(ScheduleOrderDetailDto.Sh_productCode) HeaderText="Pozycja Klienta" Width="100"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDetailDto.Sh_productCode)
HeaderText="Pozycja Klienta"
Width="100"></GridColumn> Width="100"></GridColumn>
</GridColumns> </GridColumns>
<GridFilterSettings Type="FilterType.Excel"/> <GridFilterSettings Type="FilterType.Excel"/>
@@ -54,6 +60,7 @@
<GridFilterSettings Type="FilterType.Excel"/> <GridFilterSettings Type="FilterType.Excel"/>
<GridPageSettings PageSize="PageSize"/> <GridPageSettings PageSize="PageSize"/>
</SfGrid> </SfGrid>
</div>
@code { @code {
[Parameter] public required IEnumerable<ScheduleOrderDto> GridData { get; set; } [Parameter] public required IEnumerable<ScheduleOrderDto> GridData { get; set; }
@@ -84,4 +91,5 @@
int scheduleOrderId = obj.RowData.ID; int scheduleOrderId = obj.RowData.ID;
NavigationManager.NavigateTo($"/ScheduleOrder/{scheduleOrderId}"); NavigationManager.NavigateTo($"/ScheduleOrder/{scheduleOrderId}");
} }
} }