-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIndex.vbhtml
40 lines (36 loc) · 1.18 KB
/
Index.vbhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@Code
ViewData("Title") = "Home Page"
End Code
<script type="text/javascript">
var isPreviewChangesVisible = false;
function SetButtonsVisibility(s) {
var statusBar = s.GetMainElement().getElementsByClassName("StatusBarWithButtons")[0].getElementsByTagName("td")[0];
if (!s.batchEditApi.HasChanges())
statusBar.style.visibility = "hidden";
else
statusBar.style.visibility = "visible";
}
function OnPreviewChangesClick(s, e) {
if (isPreviewChangesVisible) {
s.SetText("Show changes");
GridView.batchEditApi.HideChangesPreview();
}
else {
s.SetText("Hide preview");
GridView.batchEditApi.ShowChangesPreview();
}
isPreviewChangesVisible = !isPreviewChangesVisible;
}
function OnCustomButtonClick(s, e) {
if (e.buttonID == "deleteButton") {
s.DeleteRow(e.visibleIndex);
SetButtonsVisibility(s);
}
}
function OnBatchEditEndEditing(s, e) {
window.setTimeout(function () { SetButtonsVisibility(s); }, 0);
}
</script>
@Using Html.BeginForm()
Html.RenderAction("GridViewPartial")
End Using