- Home
- Forum
- ASP.NET Core
- Individualize DeleteConfirmDialog
Individualize DeleteConfirmDialog
trying to individualize SF-DataGrids Delete confirm dialog I use these two Javascript functions I found in one of Your examples:
function beforeOpen(args) {
var gridobj = $("#ProduktauswahlGrid").data("ejGrid");
var data = gridobj.model.currentViewData[gridobj.model.selectedRowIndex]; // get the details of the selected record
$("#" + this.element.attr("id")).find(".details").remove();
$("#" + this.element.attr("id")).prepend("Sind Sie sicher, dass Sie die Produktauswahl '" + data.Bezeichnung + "' löschen wollen?");
}
function dataBound(args) {
$("#" + this.element.attr("id") + "ConfirmDialog_wrapper").prepend("Löschen bestätigen");
$("#" + this.element.attr("id") + "ConfirmDialog").ejDialog({
beforeOpen: "beforeOpen" // bind the function beforeOpen to the beforeOpen event of the ejDialog
});
}
Unfortunately my individual confirm dialog text appears ADDITIONALLY in front oft he standard text:
Things get even worse when I call the delete a second, third, …. Time - every new individual confirm dialog text is prepended additionally:
Can You please tell me what’s going wrong here?
Thank You
Best Regards
Anis Helaoui
|
<script>
function beforeOpen(args) {
............
this.element.find("div.customconten").remove();
var elem = ej.buildTag("div.customconten", "Sind Sie sicher, dass Sie die Produktauswahl '" + data. Bezeichnung + "' löschen wollen?");
this.element.prepend(elem);
}
function dataBound(args) {
........
}
</script>
|
at Object._triggerConfirm (ej.web.all.min.js:10)
at Object.f (jquery-2.2.0.min.js:2)
at Object._trigger (ej.web.all.min.js:10)
at Object._btnMouseClickEvent (ej.web.all.min.js:10)
at HTMLInputElement.
at HTMLInputElement.dispatch (jquery-2.2.0.min.js:3)
at HTMLInputElement.r.handle (jquery-2.2.0.min.js:3)
_triggerConfirm @ ej.web.all.min.js:10
f @ jquery-2.2.0.min.js:2
_trigger @ ej.web.all.min.js:10
_btnMouseClickEvent @ ej.web.all.min.js:10
(anonymous) @ ej.web.all.min.js:10
dispatch @ jquery-2.2.0.min.js:3
r.handle @ jquery-2.2.0.min.js:3
|
@(Html.EJ().Grid<EmployeeView>("sGrid")
..............
.CssClass("deleteDialog")
..............
)
<style type="text/css">
.e-grid.deleteDialog div[id*='ConfirmDialog'] > div.e-content {
display: none;
}
</style> |
If you need further assistance please get back to us,
To: Syncfusion Support
- 4 Replies
- 3 Participants
-
AH Anis Helaui
- Feb 20, 2018 10:13 AM UTC
- Feb 23, 2018 04:41 AM UTC