Skip to content

Commit 43420cc

Browse files
authored
Update Index.cshtml
1 parent d737245 commit 43420cc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

VB/MvcDashboardUseDifferentCaches/Views/Home/Index.cshtml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
var control = sender.GetDashboardControl();
44
control.registerExtension(new DevExpress.Dashboard.DashboardPanelExtension(control, { dashboardThumbnail: "./Content/DashboardThumbnail/{0}.png" }));
55
}
6-
function onClick() {
7-
WebDashboard1.GetDashboardControl().reloadData();
8-
}
9-
function myfunction() {
6+
function reloadOnServer() {
107
$.ajax({
118
url: '@Url.Action("Refresh")',
129
success: function (data) {
@@ -15,23 +12,26 @@
1512
// WebDashboard1.GetDashboardControl().refresh( ["chartDashboardItem1", "listBoxDashboardItem1"] );
1613
}
1714
})
18-
}
15+
}
16+
function reloadOnClient() {
17+
WebDashboard1.GetDashboardControl().reloadData();
18+
}
1919
</script>
2020

2121
<div style="position: absolute; top: 5px; left: 5px">
2222
@Html.DevExpress().Button(settings => {
2323
settings.Name = "ButtonServer";
2424
settings.Text = "Reset Cache (Server)";
2525
settings.UseSubmitBehavior = false;
26-
settings.ClientSideEvents.Click = "myfunction";
26+
settings.ClientSideEvents.Click = "reloadOnServer";
2727
}).GetHtml()
2828
</div>
2929
<div style="position: absolute; top: 5px; left: 192px">
3030
@Html.DevExpress().Button(settings => {
3131
settings.Name = "ButtonClient";
3232
settings.UseSubmitBehavior = false;
3333
settings.Text = "Reset Cache (Client)";
34-
settings.ClientSideEvents.Click = "onClick";
34+
settings.ClientSideEvents.Click = "reloadOnClient";
3535
}).GetHtml()
3636
</div>
3737
<div style="position: absolute; left: 0; top: 43px; right: 0; bottom: 0; border-top: 1px solid #cfcfcf">

0 commit comments

Comments
 (0)