Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145037 | Jun 3,2019 08:16 PM UTC | Jun 7,2019 08:01 AM UTC | Blazor | 5 |
![]() |
Tags: Grid |
|
@page "/"
@using Blazorgrid
@using WebApplication11
@using Syncfusion.EJ2.RazorComponents.Grids
<div>
<EjsGrid id="Grid" DataSource="@gridData" AllowPaging="true">
<GridColumns>
<GridColumn Field=@nameof(OrdersDetails.OrderID) HeaderText="Order ID" IsPrimaryKey="true" TextAlign="@TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(OrdersDetails.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
<GridColumn Field=@nameof(OrdersDetails.OrderDate) HeaderText=" Order Date" Format="yMd" Type="date" EditType="datepickeredit" TextAlign="@TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field=@nameof(OrdersDetails.Freight) HeaderText="Freight" Format="C2" EditType="numericedit" TextAlign="@TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(OrdersDetails.ShipCountry) HeaderText="Ship Country" EditType="dropdownedit" Width="150"></GridColumn>
</GridColumns>
</EjsGrid>
</div>
@functions {
public object gridData { get; set; }
protected override void OnInit()
{
gridData = OrdersDetails.GetAllRecords();
}
}
|
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Exe</OutputType>
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
</PropertyGroup> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.