-1
DataSourceResult
不包含ToDataSourceResult
的定義和最佳推廣方法重載QueryableExtensions.ToDataSourceResult(DataTable, DataSourceRequest)
需要類型的接收器DataTable
填寫劍道UI電網
var results = db.Accounts.ToDataSourceResult(
request,
o => new {
ID = o.ID,
AccCode = o.AccCode,
AccName = o.AccName,
Phone = o.Phone,
Email = o.Email,
DateBirth = o.DateBirth,
Address = o.Address,
Type = o.Type
}
);
return Json(results.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
@(Html.Kendo()網格() 請將.Name( 「客戶端」) –
公共類AccountsViewModel { 公共長ID {得到;集;} 衆長AccCode {獲取;集;}? [StringLength(50)] 公共字符串AccName {獲得;設置;} [StringLength(50)] 公共字符串電話{獲取;集;} [StringLength (50)] 公共條例g電子郵件{get;組; } [StringLength(50)] public string DateBirth {get;組; } [StringLength(50)] public string Address {get;組; } public int? OfferID {get;組; } public int?類型{get;組; } –