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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Position EditMode.DialogTemplate in center of screen

Thread ID:

Created:

Updated:

Platform:

Replies:

146350 Aug 1,2019 06:38 AM UTC Aug 2,2019 11:20 AM UTC ASP.NET MVC 1
loading
Tags: Grid
Malcolm van Staden
Asked On August 1, 2019 06:38 AM UTC

Hi,

Is it possible to center the dialog (edit mode =EditMode.DialogTemplate) in the center of the screen when it is opened? At the moment it's opening where ever the grid is, but the grid is sometimes quite far down on the page.

Thanks

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 2, 2019 11:20 AM UTC

Hi Malcom, 

Thanks for contacting Syncfusion Support. 

Query#:- At the moment it's opening where ever the grid is, but the grid is sometimes quite far down on the page. 

We have checked your query and achieved your requirement using ActionComplete event of the Grid. By using the target property of ejdialog we can change the dialog position. And also Set the desire target to the dialog in the beforeOpen event.  

@(Html.EJ().Grid<object>("FlatGrid")  
                               ………………………  
                                .Columns(col =>  
                                {  
                                    …………………..  
                               })  
                                          .ClientSideEvents(eve => { eve.ActionComplete("complete"); }))  
  
</div>  
<script type="text/javascript">  
    function complete(args) {  
        if (args.requestType == "beginedit" || args.requestType == "add") {  
  
            $("#" + this._id + "_dialogEdit").ejDialog({  
                 ………………..  
                beforeOpenfunction (args) {  
                    $("#" + this._id + "_dialogEdit").ejDialog({ target: ".body-content" }) // define your target  (or) here.  
                }  
            }).ejDialog("open");  
  
  
        }  
    }  
</script>  


Refer the below links for help documentation,  


Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 



CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon