Blazor如何在表中排序或asc数据



嗨,我想在我的blazor中显示一个简单的表格,并根据日期、对数据进行排序

<tbody>
@foreach (var received in Rec)
{

<tr>
<td>@received.DocumentType</td>
<td>@received.SenderName</td>
<td>@received.Subject</td>
<td>@received.Date</td>
<td>@received.Forwarded</td>
<td>@received.Remarks</td>
</tr>
}


</tbody>

使用Linq。。。

@using System.Linq
@foreach (var received in Rec.OrderBy(a => a.Date))
{
...
}

相关内容

  • 没有找到相关文章

最新更新