بله مشکل از نام ستونهای متناظر بود توی بخش column و تعریف template فراموش کرده بودم اونجا رو هم باید دو تا فیلدی که دارم رو همه حروفشون کوچک باشه. ممنون از دقت نظر شما. فقط یه مساله ای که دارم این هستش که تاریخ رو من به شکل Datetime دارم میخونم داخل مدل هام ولی اینجا نشون نمیده داخل جدول. به این شکل تعریف شده داخل viewModel :
ولی بقیه پراپرتیها درست کار میکنند.
[DisplayName("تاریخ درج")] public DateTime CreateDate { get; set; } [DisplayName("تاریخ انتشار")] public DateTime PublishDate { get; set; }
حتی الان یه پراپرتی دیگه از مدل رو نگاه کردم که از نوع string هستش(blogtype) و اون هم از سمت سرور برمی گرده ولی تو جدول خالی نشون میده :
[DisplayName("نوع مطلب")] public string BlogType { get; set; }
این هم کد داخل View بنده :
<script type="text/javascript"> $(function () { var blogDataSource = new kendo.data.DataSource({ transport: { read: { url: "@Url.Action("GetLastBlogs", "Admin")", dataType: "json", contentType: 'application/json; charset=utf-8', type: 'GET' }, parameterMap: function (options) { return kendo.stringify(options); } }, schema: { data: "data", total: "total", model: { fields: { "id": { type: "number" }, //تعیین نوع فیلد برای جستجوی پویا مهم است "title": { type: "string" }, "content": { type: "string" }, "imagepath": { type: "string" }, "attachmentid": { type: "number" }, "createdate": { type: "string" }, "publishdate": { type: "date" }, "blogtype": { type: "string" }, "lastmodified": { type: "date" }, "visitcount": { type: "number" }, "isarchived": { type: "boolean" }, "ispublished": { type: "boolean" }, "isdeleted": { type: "boolean" }, "tags": { type: "string" } } } }, error: function (e) { alert(e.errorThrown); }, pageSize: 10, sort: { field: "id", dir: "desc" }, serverPaging: true, serverFiltering: true, serverSorting: true }); $("#report-grid").kendoGrid({ dataSource: blogDataSource, autoBind: true, scrollable: false, pageable: true, sortable: true, filterable: true, reorderable: true, columnMenu: true, columns: [ { field: "id", title: "شماره", width: "130px" }, { field: "title", title: "عنوان مطلب" }, { field: "createdate", title: "تاریخ درج" }, { field: "publishdate", title: "تاریخ انتشار" }, { field: "content", title: "خلاصه مطلب" }, { field: "blogtype", title: "نوع" }, { field: "lastmodified", title: "آخرین ویرایش" }, { field: "visitcount", title: "تعداد بازدید" }, { field: "isarchived", title: "آرشیو شده", template: '<input type="checkbox" #= isarchived ? checked="checked" : "" # disabled="disabled" ></input>' }, { field: "ispublished", title: "منتشر شده", template: '<input type="checkbox" #= ispublished ? checked="checked" : "" # disabled="disabled" ></input>' } ] }); }); </script>