We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Access the Dialog when using Dialog Edit

Thread ID:





118004 Jan 20,2015 08:45 AM UTC Jan 21,2015 09:23 AM UTC JavaScript 1
Tags: ejGrid
Bruce Gilham
Asked On January 20, 2015 08:45 AM UTC

I need to access the Dialog that is created for add/edit when using this code:

    <div id="SliderPageItems" data-bind="ejGrid: {
    dataSource: dataSource,
    columns: column,
            showToolbar: true,
            toolbarItems: tool
    actionComplete: 'complete',
    endEdit: 'endEdit',
    endAdd: 'endAdd',
            allowEditing: true,
            allowAdding: true,
            allowDeleting: true,
            editMode: 'dialogtemplate',
            dialogEditorTemplateID: '#template'
     allowGrouping: false,
     allowSorting: false,
     allowPaging: false,
     allowFiltering: false,
     }" />



Madhu Sudhanan P [Syncfusion]
Replied On January 21, 2015 09:23 AM UTC

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" }                       






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.


Madhu Sudhanan. P


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon