1ere tentative de sort (il faut changer la recuperation des listes le datagrid me bloque)
continuous-integration/drone/push Build is failing Details

master
Théo RENAUD 2 years ago
parent 95342a887b
commit 8efc1737d9

@ -65,7 +65,6 @@
<div class="col-12"> <div class="col-12">
<div>@Localizer["Logs"]</div> <div>@Localizer["Logs"]</div>
<div class="actions" id="actions"> <div class="actions" id="actions">
</div> </div>
</div> </div>

@ -11,3 +11,9 @@
display: grid; display: grid;
width: 286px; width: 286px;
} }
.actions {
border: 1px solid black;
height: 250px;
overflow: scroll;
}

@ -20,6 +20,7 @@
Responsive> Responsive>
</DataGrid> </DataGrid>
<button type="button" class="btn btn-danger" @onclick="() => SortItem()"><i class="fa fa-trash"></i> Supprimer</button>
<p> <p>
<b>CurrentCulture</b>: @CultureInfo.CurrentCulture <b>CurrentCulture</b>: @CultureInfo.CurrentCulture

@ -40,14 +40,18 @@ namespace BlazorApp1.Pages
if (!e.CancellationToken.IsCancellationRequested) if (!e.CancellationToken.IsCancellationRequested)
{ {
Items = await DataService.List(e.Page, e.PageSize); Items = await DataService.List(e.Page, e.PageSize);
SortItem2(Items);
totalItem = await DataService.Count(); totalItem = await DataService.Count();
} }
} }
private List<Item> SortItem() private List<Item> SortItem2(List<Item> i)
{ {
List<Item> ListeOrder = new List<Item>(); i.OrderBy(i => i.DisplayName).ToList();
ListeOrder = (List<Item>)ListeOrder.OrderBy(Item => Item.DisplayName); return i;
return ListeOrder; }
private void SortItem()
{
SortItem2((List<Item>)Items);
} }
} }
} }

Loading…
Cancel
Save