@using Syncfusion.EJ2.Blazor.Navigations
@using Syncfusion.EJ2.Blazor.Grids
<EjsTab>
<TabItems>
// your shared code snippet here.
</TabItems>
</EjsTab>
@code{
public List<Order> Orders { get; set; }
Order Model = new Order();
protected override void OnInitialized()
{
Orders = Enumerable.Range(1, 5).Select(x => new Order()
{
OrderID = 1000 + x,
CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
Freight = 2.1 * x,
OrderDate = DateTime.Now.AddDays(-x),
}).ToList();
}
public class Order
{
public int? OrderID { get; set; }
public string CustomerID { get; set; }
public DateTime? OrderDate { get; set; }
public double? Freight { get; set; }
}
} |