【发布时间】:2015-10-28 09:07:38
【问题描述】:
您好,我有一个可以正常工作的剑道网格,但我想知道是否可以通过单击按钮添加另一个精确的网格,这样我就可以拥有同一个网格的多个实例?
我正在从 sql 数据库中获取所有数据。
我的网格代码是 ->
function DisplaySearch() {
var textS = $('#searchBox').val();
Textvalue = textS;
$.ajax({
type: "post",
data: JSON.stringify({
search_string: Textvalue,
}),
url: "Search.aspx/display_search",
dataType: "json",
contentType: 'application/json',
success: function (object) {
response(object);
},
complete: function (object) {
},
error: function (object) {
}
});
function response(object) {
$("#searchGrid").kendoGrid({
dataSource: {
data: object.d,
schema: {
model: {
archive_header_key: { type: "number" },
group_Name: { type: "string" },
Server: { type: "string" },
archive: { type: "string" },
display_name: { type: "string" },
file_written: { type: "number" },
session_ID: { type: "string" },
},
},
pageSize: 20,
},
reorderable: true,
navigatable: true,
selectable: "multiple",
scrollable: true,
sortable: true,
filterable: false,
columnMenu: true,
pageable: {
input: true,
numeric: true
},
columns: [
{ field: "archive_header_key", title: "Key", width: 50 },
{ field: "Server", title: "Server", width: 75 },
{ field: "group_Name", title: "Group", width: 75 },
{ field: "archive", title: "Archive", width: 50 },
{ field: "display_name", title: "Display name", width: 300 },
{ field: "file_written", title: "Files", width: 50 },
{ field: "session_ID", title: "Session", width: 200 },
]
});
}
};
任何帮助将不胜感激。
【问题讨论】:
-
你不能选择另一个 div(比如#searchGrid1)并附加相同的 kendoui 定义吗? $("#searchGrid1").kendoGrid({
-
我会尝试并告诉你谢谢。
标签: javascript jquery .net kendo-ui kendo-grid