- Home
- Forum
- ASP.NET MVC
- change the Task Information default position
change the Task Information default position
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
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
SIGN IN To post a reply.
3 Replies
JD
Jayakumar Duraisamy
Syncfusion Team
July 12, 2017 10:58 AM UTC
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,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/MVC5_GanttSample-1936063324
Please let us know, if you require any other assistance.
Regards,
Jayakumar D
JA
Jacob
July 14, 2017 02:27 AM UTC
Thanks,
I'm glad for this solution.
Now I know how to change the position of popup.
Best regards.
JD
Jayakumar Duraisamy
Syncfusion Team
July 14, 2017 03:57 AM UTC
Hi Jacob,
We are glad that your requirement has been met. Please let us know if you need any other assistance.
Regards,
Jayakumar D
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JA Jacob
- Jul 11, 2017 03:59 AM UTC
- Jul 14, 2017 03:57 AM UTC