BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Bruce,
Thanks for using Syncfusion products.
Query : “I need to access the Dialog that is created for add/edit”
We can access the Editing Dialog that will created during Edit operation using the id of the dialog. The Id of the dialog will be in the following format.
$("#" + GridId + "_dialogEdit"); //Where GridId is grid element id |
For you convenience we have created a simple Knockout sample with Dialog Template editing and the same can be downloaded from the below location.
Sample Location: http://www.syncfusion.com/downloads/support/directtrac/118004/Ko-DialogTemplate1860974782.zip
In the above link sample, we have access the grid edit dialog in the actionComplete event as follows.
function complete(args) { if (args.requestType == "beginedit" || args.requestType == "add") {
//Get grid element id var gridId = this.element.attr("id");
//Get the edit dialog var dlgElement = $("#" + gridId + "_dialogEdit");
//Get Dialog instance var dlgInstance = dlgElement.ejDialog("instance");
//Check whether the dialog is opened if (dlgInstance.isOpened()) {
var dropdown = dlgElement.find("#FirstName").ejDropDownList({ dataSource: window.employeeView, fields: { text: "FirstName" } }).ejDropDownList("instance");
dropdown.setSelectedText($("#FirstName").val()); } } } |
In the above code snippet, we have obtained the dialog instance and using that we have rendered a ejDropDownList to edit “FirstName” field.
Please let us know if we misunderstood your requirement and provide us more information regarding your requirement. The information provided would be more helpful for us to analyze the issue and provide you the response as early as possible.
Regards,
Madhu Sudhanan. P