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

44 lines
1.3 KiB
C#

@using System.ComponentModel
<Table DataSource="data" PageSize="50" ScrollX="1300">
<Column @bind-Field="@context.Name" Width="100" Fixed="left" />
<Column @bind-Field="@context.Age" Width="100" Fixed="left" />
<Column Title="Column 1" @bind-Field="@context.Address" />
<Column Title="Column 2" @bind-Field="@context.Address" />
<Column Title="Column 3" @bind-Field="@context.Address" />
<Column Title="Column 4" @bind-Field="@context.Address" />
<Column Title="Column 5" @bind-Field="@context.Address" />
<Column Title="Column 6" @bind-Field="@context.Address" />
<Column Title="Column 7" @bind-Field="@context.Address" />
<Column Title="Column 8" @bind-Field="@context.Address" />
<ActionColumn Title="Action" Width="100" Fixed="right">
<a>action</a>
</ActionColumn>
</Table>
@code {
class Column
{
[DisplayName("Full Name")]
public string Name { get; set; }
public int Age { get; set; }
public string Address { get; set; }
}
Column[] data = new Column[] {
new()
{
Name = "John Brown",
Age = 32,
Address = "New York Park"
},
new()
{
Name = "Jim Green",
Age = 40,
Address = "London Park"
},
};
}