这是我的网格:
$("#myHtmlTable1").kendoGrid({
dataSource: {
pageSize: 18
},
scrollable: false,
sortable: true,
filterable: true,
selectable: true,
pageable: {
input: false,
numeric: false
},
change: function () {
// MY LOGIC
},
columns: [
{
field: "Col1",
width: 40
},
{
field: "Col2",
width: 250
},
{
width: 40,
field: "Col3"
},
{
width: 150,
field: "Col4"
}
]
});
Run Code Online (Sandbox Code Playgroud)
当我点击一行时,我会得到行文本并将其放入另一个文本框中。但我只想使用鼠标左键执行此操作,以便我可以在网格上使用右击查看源代码页。
我有一个剑道网格,并且启用了多重排序。
代码:
sortable: {
mode: "multiple",
allowUnsort: true
}
Run Code Online (Sandbox Code Playgroud)
因为我正在编写服务器端代码来发送对排序操作的响应。为此,我想知道 Kendo Grid 支持的用于多重排序的最大列数。谢谢。
我正在开发一个带有 javascript 内联可编辑选项的 KendoUI 网格,并且无法使更新按钮触发点击事件并将数据发布到服务器端更新事件。单击更新按钮甚至不会更新客户端上的网格。
希望有人能帮我指出我在这里做错了什么。
这不是重复的,因为我已经厌倦了答案中的 jfiddle 链接并且它也不起作用。 剑道 UI 网格更新功能不会触发
<div id="grid"></div>
@section Scripts{
<script type="text/javascript">
$(function () {
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "Home/GetPupilsAsJson",
dataType: 'json'
},
update: {
url: "Home/UpdatePupils",
dataType: 'json',
type: 'POST'
}
},
pageSize: 5,
autoSync: true
});
$('#grid').kendoGrid({
dataSource: dataSource,
editable: "inline",
pageable: true,
columns: [{
field: "Id",
title: "Id",
width: 150,
hidden: true
}, {
field: "Firstname",
title: "Firstname",
width: 150
}, {
field: "Lastname",
title: …Run Code Online (Sandbox Code Playgroud) 返回数据源后,我试图在我的 kendo-ui 下拉列表中设置索引。我可以使用复选框(不想使用)来完成它,我可以在数据源是本地 json 的下拉列表中完成它。最后一个选项(我想要的)是根据从传输返回的数据源设置选定的值。
那么,为什么这不起作用?
$("#products-dropDownList-remote").kendoDropDownList({
dataTextField: "ProductName",
dataValueField: "ProductID",
autoBind: false,
dataSource: {
transport: {
read: {
dataType: "jsonp",
url: "http://demos.telerik.com/kendo-ui/service/Products"
}
},
requestEnd: function (e) {
//is this how I set this after the request is successful? why doesn't it set it here?
$("#products-dropDownList-remote").data('kendoDropDownList').select(1);
}
}
});
//this doesn't feel like it should work, but does according
//to this forum thread
//http://www.telerik.com/forums/how-do-you-set-the-value-of-a-dropdownlist-after-reading-external-data
//it should....but it doesn't.
$("#products-dropDownList-remote").data('kendoDropDownList').select(1);
Run Code Online (Sandbox Code Playgroud)
这是一个包含所有 3 个选项的 jsFiddle - http://jsfiddle.net/bensjones/H47b3/
有什么建议?
为什么不在编辑字段的编辑器模板上向我显示网格验证?我不明白为什么不阅读数据注释。抱歉英语不好...
起初我像这样创建了剑道网格:
<div id="grid">
@(Html.Kendo().Grid<CardView>()
.Name("Grid")
.Columns(x =>
{
x.Bound(c => c.CardID).Title("Card Nm.");
x.Bound(c => c.ExpirationDate).Format("{0:dd/MM/yyyy}");//.EditorTemplateName("KendoDatePicker");
x.Command(cmd =>
{
cmd.Edit();
}).Title("Edit");
})
.BindTo(Model)
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(x => x.CardID);
})
.ServerOperation(true)
.Read(read => read.Action("Index", "Home"))
.Events(events => events.Error("error_handler"))
.Update(update => update.Action("Update", "Home"))
.Editable(editable =>editable.Mode(GridEditMode.InLine)))
</div>
Run Code Online (Sandbox Code Playgroud)
这是在数据源事件错误中使用的 javascript:
<script>
function error_handler(e, status) {//Klaidu isvedimas
if (e.errors) {
var message = "Error:\n";
var grid = $('#GrdKendo').data('kendoGrid');
var gridElement = grid.editable.element;
var validationMessageTemplate = kendo.template(
"<div id='#=field#_validationMessage' " + …Run Code Online (Sandbox Code Playgroud) 我真的不知道这是对此的kendo ui支持.
我想JQuery在kendo ui模板中编写一个函数
这是一个例子
<script type="text/x-kendo-template" id="someId">
#
$(document).ready(function () {
$('#textfield1').attr('required');
});
#
<script>
Run Code Online (Sandbox Code Playgroud)
事情是哈希("#")标记给我一个错误,因为剑道ui使用哈希标记来分隔剑道UI中的JavaScript和HTML.那么如何在上面的例子中添加哈希标记呢.有人能帮我吗 ??
我使用KendoUI Grid来显示数据.当我在配置指南中使用columns.filterable时,显示数据太长.
如上图所示.
我调查并使用.k-multicheck-wrap来扩展宽度.
但是我遇到的问题是上面的css类会影响到所有过滤菜单.
所以我想影响上传时间列只.
如何从Kendo-multiSelect获取选定的值?
$("#doc").kendoMultiSelect({
value: ,
dataSource: {
data: self.list()
},
});
Run Code Online (Sandbox Code Playgroud) 我正在尝试在加载网格时默认选择角度剑道网格的第一行。有什么建议么 ?
在TypeScript中我有这个简单的代码:
namespace Customer {
function onOpen() {
}
}
Run Code Online (Sandbox Code Playgroud)
它产生:
var Customer;
(function (Customer) {
function onOpen() {
}
})(Customer || (Customer = {}));
Run Code Online (Sandbox Code Playgroud)
为了让Kendo使用onOpenJS需要看起来像这样(注意onOpen).这可能吗?:
var Customer;
(function (Customer) {
Customer.onOpen = function () {
}
})(Customer || (Customer = {}));
Run Code Online (Sandbox Code Playgroud) kendo-ui ×10
kendo-grid ×5
jquery ×4
javascript ×3
asp.net-mvc ×2
ajax ×1
angular ×1
c# ×1
css ×1
filter ×1
html ×1
knockout.js ×1
razor ×1
telerik ×1
typescript ×1
width ×1