-
Notifications
You must be signed in to change notification settings - Fork 1
/
ConfirmPopup.cshtml
36 lines (34 loc) · 1.32 KB
/
ConfirmPopup.cshtml
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
@Html.DevExpress().PopupControl(settings => {
settings.Name = "ConfirmPopup";
settings.HeaderText = "Warning";
settings.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
settings.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
settings.SetContent(() => {
Html.DevExpress().FormLayout(form => {
form.Name = "ConfirmForm";
form.ColCount = 2;
form.SettingsItems.ShowCaption = DefaultBoolean.False;
form.Items.Add(i => {
i.NestedExtension().Label(label => {
label.Name = "ConfirmLabel";
label.Properties.EnableClientSideAPI = true;
label.Text = "Are you sure?";
});
i.ColSpan = 2;
});
form.Items.Add(i => {
i.NestedExtension().Button(button => {
button.Name = "ConfirmYes";
button.Text = "Yes";
});
});
form.Items.Add(i => {
i.NestedExtension().Button(button => {
button.Name = "ConfirmNo";
button.Text = "No";
button.ClientSideEvents.Click = "function(){ ConfirmPopup.Hide(); }";
});
});
}).Render();
});
}).GetHtml()