Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147980 | Sep 30,2019 02:58 PM UTC | Oct 2,2019 05:09 AM UTC | ASP.NET MVC | 3 |
![]() |
Tags: Grid |
@(Html.EJ().Grid<OrdersView>("ForeignKey")
.Datasource((IEnumerable<object>)ViewBag.dataSource1)
.AllowPaging()
.AllowGrouping()
.Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width(90).Add();
col.Field("EmployeeID").HeaderText("Employee Name").ForeignKeyField("EmployeeID")
.ForeignKeyValue("FirstName").DataSource((IEnumerable<object>)ViewBag.dataSource2)
.TextAlign(TextAlign.Left).Width(90).Add();
})
)
} |
@(Html.EJ().Grid<object>("FlatGrid")
.AllowSorting()
.Columns(col =>
{
. . .
col.Field("EmployeeID_FirstName").HeaderText("First Name")
.EditType(EditingType.Dropdown).DataSource((IEnumerable<object>)ViewBag.datasource2).DropDownEditOptions(new DropDownListProperties() { DropDownListFields = { Text = "FirstName", Value = "FirstName" } }).Width(90).Add();
})
)
|
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.