이 링크를 따라 KendoUI 그리드에서 사용자 정의 도구 모음을 만들려고합니다 : http://demos.telerik.com/kendo-ui/grid/toolbar-template하지만 오류가 발생합니다. 내가 문제는 내가 그것을 위해 솔루션을 알아낼 수 없습니까의 된 시간 모르겠어요TypeError : r.getClientRects가 함수가 아닙니다.
<div id="example">
<script type="text/x-kendo-template" id="template">
<div class="toolbar">
<label class="category-label" for="category">Show products by category:</label>
<input type="search" id="category" style="width: 150px" />
</div>
</script>
<div id="grid"></div>
<script>
$(document).ready(function() {
var grid = $("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: 'http://localhost:52738/Default1/KendoDataAjaxHandle',
type: "post",
dataType: "json"
}
},
schema: {
data: "Data",
total: function (response) {
return $(response.Data).length;
}
},
pageSize: 10
},
toolbar: kendo.template($("#template").html()),
groupable: true,
sortable: true,
pageable: {
refresh: true,
pageSizes: true,
buttonCount: 5
},
columns: [
{
field: "CustomerAltID",
filterable: true
},
{
field: "CustomerID",
title: "Customer ID"
},
{
field: "CustomerName",
title: "Customer Name",
template: "<div class='customer-photo'" +
"style='background-image: url(../Content/Images/customerimg/#:data.CustomerID#.jpg);'></div>" +
"<div class='customer-name'>#: CustomerName #</div>"
},
{
field: "Gender",
title: "Gender",
template: "<div class='gender-photo'" +
"style='background-image: url(../Content/Images/#:data.Gender#.jpg);'></div>"
}
]
});
var dropDown = grid.find("#category").kendoDropDownList({
dataTextField: "Gender",
dataValueField: "CustomerID",
autoBind: false,
optionLabel: "All",
dataSource: {
severFiltering: true,
transport: {
read: {
url: 'http://localhost:52738/Default1/KendoDataAjaxHandle',
type: "post",
dataType: "json"
}
},
schema: {
data:"Data"
}
},
change: function() {
var value = this.value();
if (value) {
grid.data("kendoGrid").dataSource.filter({ field: "CustomerID", operator: "eq", value: parseInt(value) });
} else {
grid.data("kendoGrid").dataSource.filter({});
}
}
});
});
</script>
</div>
:
이것은 내 코드에서 일을하려고하고있는 무슨이다. 나는 1.12
무엇이 오류입니까? 사용할 수없는 dataSource 끝점 외에도 도구 모음에는 레이블과 DropDownList (http://dojo.telerik.com/@Stephen/aSIni)가 있습니다. 문제를 보여주는 dojo/jsfiddle을 제공 할 수 있습니까? 3.1 대신 검도와 함께 제공되는 jQuery 버전을 사용해 보셨습니까? 충돌을 배제하기 위해 jQuery-UI를 포함하지 않고 (이 코드에서는 필요하지 않음) 시도해 보셨습니까? –