Привет, у меня есть сетка Кендо, которая отлично работает, но мне было интересно, можно ли добавить еще один точный щелчок на кнопке, чтобы я мог иметь несколько экземпляров одной и той же сетки?Возможно ли иметь несколько экземпляров сетки кендо
Я получаю все данные из базы данных 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) и приложить к нему такое же определение кендуи? $ ("# searchGrid1"). KendoGrid ({<- Нравится? –
Я попробую и дам вам знать спасибо. –