Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148169 | Oct 8,2019 09:44 PM UTC | Oct 22,2019 01:38 PM UTC | Blazor | 4 |
![]() |
Tags: Grid |
<EjsGrid DataSource="@Orders" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })" Height="315">
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true"></GridEditSettings>
<GridColumns>
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn HeaderText="Customer Name" EditType="EditType.DropDownEdit" Edit="@DropParams" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" EditType="EditType.DatePickerEdit" Format="yMd" TextAlign="TextAlign.Right" Width="130" Type="ColumnType.Date"></GridColumn>
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
</GridColumns>
</EjsGrid>
@code{
public static List<Order> Orders { get; set; }
public static List<Countries> DDLData = new List<Countries>
{
new Countries() { Name = "Community", Code = "AU" },
new Countries() { Name = "Qualified", Code = "BM" },
new Countries() { Name = "Other", Code = "CA" },
};
public object DropParams = new
{
@@params = new DropDownListModel<string> { DataSource = DDLData, Query = "new ej.data.Query()",Fields= new FieldSettingsModel() { Text = "Name" ,Value="Name" } }
};
|
|
|
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.