如何使用Javascript重新加载或刷新Kendo Grid?
通常需要在某个时间之后或在用户操作之后重新加载或刷新网格.
我有一个KendoGrid
类似下面,当我运行应用程序时,我没有得到date
列的预期格式.
$("#empGrid").kendoGrid({
dataSource: {
data: empModel.Value,
pageSize: 10
},
columns: [
{
field: "Name",
width: 90,
title: "Name"
},
{
field: "DOJ",
width: 90,
title: "DOJ",
type: "date",
format:"{0:MM-dd-yyyy}"
}
]
});
Run Code Online (Sandbox Code Playgroud)
当我运行它时,我2013-07-02T00:00:00Z
在DOJ专栏中得到了" ".为什么不格式化?任何的想法?
对于提供在线编辑的DataGrid,是否有任何AngularJS模块?KendoUI中有一个 http://demos.kendoui.com/web/grid/editing-inline.html
AngularJS和KendoUI可以一起使用吗?
我的视图中有一个kendo ui下拉列表:
$("#Instrument").kendoDropDownList({
dataTextField: "symbol",
dataValueField: "symbol",
dataSource: data,
index: 0
});
Run Code Online (Sandbox Code Playgroud)
如何使用jQuery更改它的选定值?我试过了:
$("#Instrument").val(symbol);
Run Code Online (Sandbox Code Playgroud)
但它没有按预期工作.
我有一个kendoUI网格.
@(Html.Kendo().Grid<EntityVM>()
.Name("EntitesGrid")
.HtmlAttributes(new { style = "height:750px;width:100%;scrollbar-face-color: #eff7fc;" })
.Columns(columns =>
{
columns.Bound(e => e.Id).Hidden().IncludeInMenu(false);
columns.Bound(e => e.EntityVersionId).Hidden().IncludeInMenu(false);
columns.Bound(e => e.Name).Width("70%").Title("Entity Name");
columns.Bound(e => e.EIN).Width("30%");
})
.ToolBar(toolBar => toolBar.Template("<a class='k-button k-button-icontext k-grid-add' id='addEntity'><span class='k-icon k-add'></span>Entity</a>" +
"<a class='k-button k-button-icontext' id='editEntity'><span class='k-icon k-edit'></span>Edit</a>"))
.DataSource(dataSource => dataSource
.Ajax().ServerOperation(false)
.Model(model => model.Id(e => e.Id))
.Read(read => read.Action("GetEntities", "Entity", new { projectId = Request.QueryString[DataKeyNameConstants.ProjectId] })))
.Sortable()
.Scrollable()
.Filterable()
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.ColumnMenu()
.Selectable(s => s.Mode(GridSelectionMode.Multiple))
.Events(events => events.Change("entSelChange"))
)
Run Code Online (Sandbox Code Playgroud)
现在,我需要从选定的行中获取EntityVersionId的值.但不知道该怎么做. …
我正在尝试在网格内容中显示友好消息(如"找不到记录,稍后再试"),此时数据库中没有记录.
从我在文档中看到的内容来看,目前无法为网格内容执行此操作.它只适用于页脚.你可以在这个小提琴中看到这个例子:http://jsfiddle.net/lav911/uNWXJ/
我故意拼错了数据路径,以便有一个空的网格.要查看内容,只需注释/取消注释这些行:
transport: {
// read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customerss"
},
Run Code Online (Sandbox Code Playgroud)
有没有一个干净的方法来实现这一目标?
我正在开发一个HTML5和JavaScript网站.
是否可以在Kendo UI Grid中使用隐藏列并使用JQuery访问该值?
当我运行我的MVC4 Web应用程序时,它给我以下错误:
Could not load file or assembly 'WebGrease' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'WebGrease' or one of its dependencies. The located assembly's manifest definition …
Run Code Online (Sandbox Code Playgroud) kendo-ui ×10
kendo-grid ×5
javascript ×4
c# ×3
asp.net-mvc ×2
jquery ×2
.net ×1
angularjs ×1
css ×1
date ×1
grid ×1
telerik ×1