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>@Localizer["Logs"]</div>
<div class="actions" id="actions">
</div>
</div>

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

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

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

Loading…
Cancel
Save