ant-design-blazor/site/AntDesign.Docs/Demos/Components/Table/demo/FixedHeader.razor
2021-02-06 20:15:46 +08:00

26 lines
592 B
C#

<Table DataSource="data" ScrollY="240px" PageSize="50">
<Selection />
<Column @bind-Field="@context.Name" Width="150" />
<Column @bind-Field="@context.Age" Width="150" />
<Column @bind-Field="@context.Address" />
</Table>
@code {
class Column
{
public string Name { get; set; }
public int Age { get; set; }
public string Address { get; set; }
}
Column[] data = Enumerable.Range(0, 100).Select(i => new Column()
{
Name = $"Edward King {i}",
Age = 32,
Address = $"Edward King {i}"
}).ToArray();
}