Javascript 提交时不重新加载剑道UI
我有点小问题 我在另一个剑道格中有一个剑道格。当我在主网格上添加所选记录的新记录时,会显示此子网格 这里没有问题,给我带来的不便是我想在不刷新整个页面的情况下刷新网格数据,因为我有太多记录,再次搜索该记录以添加新记录会有点乏味 有人对此有建议吗Javascript 提交时不重新加载剑道UI,javascript,php,doctrine-orm,kendo-ui,kendo-grid,Javascript,Php,Doctrine Orm,Kendo Ui,Kendo Grid,我有点小问题 我在另一个剑道格中有一个剑道格。当我在主网格上添加所选记录的新记录时,会显示此子网格 这里没有问题,给我带来的不便是我想在不刷新整个页面的情况下刷新网格数据,因为我有太多记录,再次搜索该记录以添加新记录会有点乏味 有人对此有建议吗 <script type="text/javascript" > $(document).ready(function() { {% if app.session.hasFlash('Mensaj
<script type="text/javascript" >
$(document).ready(function() {
{% if app.session.hasFlash('MensajeError') %}
$("#mensajeFlashError").fadeIn('slow').delay(6000).fadeOut('slow');
{%endif%}
{% if app.session.hasFlash('Mensaje') %}
$("#mensajeFlash").fadeIn('slow').delay(6000).fadeOut('slow');
{%endif%}
$("#grid").kendoGrid(
{
sortable: true,
filterable: true,
resizable:true,
pageable:true,
detailInit: detailInit,
detailTemplate: kendo.template($("#template5").html()),
dataSource:
{
pageSize: 15,
transport:
{
read: "{{path('slb_do_liquidaciones_listado',{ 'catalogo' : inhouse })}}",
},
schema:
{
data: "data",
total: function(response)
{
return response.data.length;
},
model:
{
id: "id",
fields:
{
id:{editable: false,type :"number"},
descripcion: { editable: false },
fecha_creacion: { editable: false },
usuario_creacion: { editable: false },
}
}
}
},
columns:
[
{ field: "id",filterable: true, title: "No. DO",width: 70 },
{ field: "descripcion",filterable: true, title: "Descripcion",width: 310 },
{ field: "fecha_creacion",filterable: true, title: "Fecha",width: 70 },
{ field: "usuario_creacion",filterable: true, title: "Usuario",width: 100 },
{command: [{ text: "Nuevo Rubro",imageClass:"k-icon k-add" ,click: showDetails }], title: " ", width: "230px" }
// { command: ["create"], title: " ", width: "100px" }
],
editable: "popup",
pageable:
{
//refresh: true,
messages:
{
display: "{0} - {1} de {2} DO", //{0} is the index of the first record on the page, {1} - index of the last record on the page, {2} is the total amount of records
empty: "No existen Datos",
page: "Página",
of: "de {0}", //{0} is total amount of pages
itemsPerPage: "Facturas por página",
first: "Ir al Inicio",
previous: "Previa",
next: "Siguiente",
last: "Ir al Final",
refresh: "Actualizar"
}
},
filterable:
{
messages:
{
info: "", // sets the text on top of the filter menu
filter: "Buscar", // sets the text for the "Filter" button
clear: "Limpiar", // sets the text for the "Clear" button
gte: "Mayor o igual a",
and: "y",
or: "o",
eq: "Igual a",
},
operators:
{
//filter menu for "number" type columns
number:
{
eq: "Igual a",
neq: "Diferente a",
gte: "Mayor o igual que",
gt: "Mayor que",
lte: "Menor o igual que",
lt: "Menor que"
},
//filter menu for "date" type columns
date:
{
eq: "Igual a",
neq: "Diferente a",
gte: "Despues o igual a",
gt: "Después de",
lte: "Antes o igual a",
lt: "Antes del"
},
//filter menu for foreign key values
enums:
{
eq: "Igual a",
neq: "Dirferente a"
}
}
},
}
);
$(".tabstrip").kendoTabStrip(
{
animation:
{
open: { effects: "fadeIn" }
}
});
});
$(文档).ready(函数(){
{%if app.session.hasFlash('MensajeError')%}
$(“#mensajeFlashError”).fadeIn('slow')。delay(6000)。fadeOut('slow');
{%endif%}
{%if app.session.hasFlash('Mensaje')%}
$(“#mensajeFlash”).fadeIn('slow')。delay(6000)。fadeOut('slow');
{%endif%}
$(“#网格”).kendoGrid(
{
可排序:是的,
可过滤:正确,
可调整大小:正确,
pageable:对,
detailInit:detailInit,
detailTemplate:kendo.template($(“#template5”).html(),
数据源:
{
页面大小:15,
运输:
{
阅读:“{path('slb_do_liquidaciones_listado',{'catalogo':inhouse}}}”,
},
模式:
{
数据:“数据”,
总计:功能(响应)
{
返回响应.data.length;
},
型号:
{
id:“id”,
领域:
{
id:{可编辑:false,键入:“number”},
description:{可编辑:false},
fecha_creacion:{可编辑:false},
usuario_creacion:{可编辑:false},
}
}
}
},
柱:
[
{字段:“id”,可过滤:true,标题:“No.DO”,宽度:70},
{字段:“Description”,可过滤:true,标题:“Description”,宽度:310},
{字段:“fecha_creacion”,可过滤:true,标题:“fecha”,宽度:70},
{字段:“usuario_creacion”,可过滤:true,标题:“usuario”,宽度:100},
{命令:[{文本:“Nuevo Rubro”,图像类:“k-icon k-add”,点击:showDetails}],标题:,宽度:“230px”}
//{命令:[“创建”],标题:,宽度:“100px”}
],
可编辑:“弹出”,
可分页:
{
//刷新:是的,
信息:
{
显示:“{0}-{1}de{2}DO”,//{0}是页面上第一条记录的索引,{1}-页面上最后一条记录的索引,{2}是记录总数
空:“不存在数据”,
第页:“帕吉纳”,
其中:“de{0},//{0}是总页数
物品专页:“真实的世界”,
第一:“伊尼西奥先生”,
上一篇:“Previa”,
下一个:“Siguiente”,
最后:“最后一场比赛”,
刷新:“现实生活”
}
},
可过滤:
{
信息:
{
信息:,//设置过滤器菜单顶部的文本
filter:“Buscar”,//设置“filter”按钮的文本
清除:“Limpiar”,//设置“清除”按钮的文本
gte:“o伊瓜尔a市长”,
和:“y”,
或:“o”,
情商:“鬣蜥a”,
},
操作员:
{
//“数字”类型列的筛选菜单
编号:
{
情商:“鬣蜥a”,
neq:“不同的a”,
gte:“伊瓜尔克市长”,
gt:“奎市长”,
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
},
schema: {
model: {
fields: {
OrderID: { type: "number" },
Freight: { type: "number" },
ShipName: { type: "string" },
OrderDate: { type: "date" },
ShipCity: { type: "string" }
}
}
},
requestEnd: onRequestEnd
},
function onRequestEnd(e) {
if (e.type == "create") {
$("#SiteGrid").data("kendoGrid").dataSource.read();
}
else if (e.type == "update") {
$("#SiteGrid").data("kendoGrid").dataSource.read();
}
}
$("#grid").kendoGrid({
dataSource:...,
..
..
,
requestEnd: onRequestEnd
})
function onRequestEnd(e) {
if (e.type == "create") {
e.sender.read();
}
else if (e.type == "update") {
e.sender.read();
}
}