如何在模式弹出窗口中使用Kendo.Grid()显示进度加载指示器?

时间:2018-08-08 15:39:23

标签: asp.net-mvc kendo-ui kendo-grid

我在Grid内定义了一个Partial View,该Grid已加载到模式弹出窗口中。

这是 @(Html.Kendo().Grid(Model.ReportReversalsData) .Name("MyGrid") . . .DataSource(ds => ds .Ajax() .Events(e => e.Error("ShowError")) .Read(r => r.Action("MyMethod", "MyController", Model)) ) ) 的一部分:

showLoading

现在,我想在每次加载数据时在Grid中启动进度加载指示器。

我试图定义在网格的RequestStart事件上调用的javascript方法.Events(e => e.Error("CheckError").RequestStart('showLoading'))

showLoading

这是.css函数,并且kendo.ui.progress需要一些<style> .k-grid-content > .k-loading-mask { visibility: hidden; } .k-grid > .k-loading-mask { z-index: 2; } .k-grid > .k-loading-mask > .k-loading-color { opacity: .7; } </style> <script> function showLoading() { kendo.ui.progress("#MyGrid", true) } </script> 样式:

SELECT
dpy.day as Day,
SUM(IFNULL(t.sec,0)) as total
FROM
(
select a.Date as day
from (
    select DATE_FORMAT(CURRENT_DATE(), '%Y-12-31') - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date
    from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a
    cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b
    cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c
) a
where a.Date between DATE_FORMAT(CURRENT_DATE(), '%Y-01-01') and DATE_FORMAT(CURRENT_DATE(), '%Y-12-31')
) dayPerYear dpy
LEFT JOIN
your_table t ON dpy.day > t.start_date AND dpy.day < t.end_date
GROUP BY dpy.day

但是,我遇到一个错误:

  

对象不支持属性或方法“查找”

我缺少什么,或者我的方法是完全错误的,还有其他方法可以做到吗?

1 个答案:

答案 0 :(得分:0)

使用实际的kendo元素代替尝试使用纯文本ID:

AccessorDeclarationSyntax