4
public class Order
{
[ScaffoldColumn(false)]
public int Id { get; set; }
public string UserName { get; set; }
public int Amount { get; set; }
[ScaffoldColumn(false)]
public Guid UniqueId { get; set; }
public DateTime CreateDate { get; set; }
public string ManagerId { get; set; }
}
public class UserProfile
{
public int Id { get; set; }
public string Username { get; set; }
public string Phone { get; set; }
[StringLength(255)]
public string NameSurname { get; set; }
public bool IsCompany { get; set; }
}
我需要Kendo Grid
顯示2種型號。視圖中的示例代碼:
@(Html.Kendo().Grid<oko.Models.OrderDto>().Name("NewOrders").Columns(columns =>
{
columns.Bound(s => s.Username);
columns.Bound(s => s.NameSurname);
columns.Bound(s => s.Phone);
columns.Bound(s => s.CreateDate).Format("{0:dd/MM/yyyy}");
})
字段UserName
它們具有相同。 如何通過字段Phone
和NameSurname
?