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.
Unfortunately, activation email could not send to your email. Please try again.

change the Task Information default position

Thread ID:

Created:

Updated:

Platform:

Replies:

131456 Jul 10,2017 11:59 PM Jul 13,2017 11:57 PM ASP.NET MVC 3
loading
Tags: Gantt
Jacob
Asked On July 10, 2017 11:59 PM

Hello,

I'm trying to change the default position of Gantt Task Information pop-up page.

At View.cshtml:

//===========================
@(Html.EJ().Gantt("gantt")
//...
    .ClientSideEvents(cs =>
    {
        cs.ActionBegin("GanttActionBegin");
    })
//...
<script>
    function GanttActionBegin(args) {

$("#ganttsample_dialogEdit_wrapper").css("top", 30);

}
</script>
//===========================

For that, I'm trying using this script:

 $("#ganttsample_dialogEdit_wrapper").css("top", 30);

And I have bind this function in ClientSideEvents, and I have tried in ActionComplete and ActionBegin and some ClientSideEvents but it doesn't work.

Is any solution to implement the functionality?

Thanks your help.

Best regards

Jayakumar Duraisamy [Syncfusion]
Replied On July 12, 2017 06:58 AM

Hi Jacob, 
Please find response below, 
In Gantt ActionBegin client side event with requestType of “beforeOpenAddDialog & beforeOpenEditDialog” will be triggered before open add/edit dialog with an argument of dialog element. By using dialog element, we can get the instance and model of dialog. 
As we knew that, ejDialog have an API called position. Hence, we can set the required X & Y position of popup in the dialog model. 
Please refer following code snippet, 
function actionBegin(args) { 
 
    if(args.requestType == "beforeOpenAddDialog"){ 
    var dialogObj =  $(args.element).ejDialog("instance"), 
    model = dialogObj.model; 
    model.position.X = 300; 
    model.position.Y = 30; 
    } 
    else if(args.requestType == "beforeOpenEditDialog"){ 
        var dialogObj = $(args.element).ejDialog("instance"), 
    model = dialogObj.model; 
    model.position.X = 300; 
    model.position.Y = 30;    } 
        } 
We have also prepared a sample for your reference. Please find the sample location as below, 
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 


Jacob
Replied On July 13, 2017 10:27 PM

Thanks,

I'm glad for this solution.

Now I  know how to change the position of popup.

Best regards.


Jayakumar Duraisamy [Syncfusion]
Replied On July 13, 2017 11:57 PM

Hi Jacob, 
We are glad that your requirement has been met. Please let us know if you need any other assistance. 
Regards, 
Jayakumar D 


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.

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.

;