Hi!
I tried build a custom task with add/edit dialog. I want resource with ResourceId = 33 automatically tick when user add new task. I use code below but it doesn't work.
if (args.requestType == "beforeOpenAddDialog") {
args.rowData.TaskName = "New task";
args.rowData.CreateDate = new Date();
args.rowData.DurationUnit = 'hour';
args.rowData.GroupId = 1;
args.rowData.ganttProperties.durationUnit = 'hour';
var userid = 33;
var res = [{ ResourceId: userid, ResourceUnit: 0, TitleId: 1, ResourceName: "", ResourceGroup: "" }];
//args.rowData.Resources = [userid];
args.rowData.ganttProperties.resourceInfo = res;
args.rowData.ganttProperties.resourceName = "";
}
Additional questions:
Thank you very much!
Best regards!
Hi Lokesh Arjunan!
Any update on this?
SL.No. |
Query |
Syncfusion Comments
| |
1 |
I want resource with ResourceId = 33 automatically tick when user add new task. I use code below but it doesn't work. |
We can make use of the openAddDialog requestType in the ActionComplete event to select a resource by default when the add dialog is opened. The below code snippets demonstrate the solution.
Index.cshtml
| |
2 |
How to set width and height of add/edit dialog? |
We can similarly use the openAddDialog and openEditDialog requestTypes to set the height and width of the of the add and edit dialog. The below code snippet demonstrate the solution.
Index.cshtml
| |
3 |
How to design general tab like bootstrap row and col. |
We are currently working on this. We will provide an update within one business day(November 23, 2021).
| |
4 |
Sometime, when first time page loaded, the task are duplicate. I use ej.base.setCulture in DOMContentLoaded event, so load function call twice. When I call gantt.refresh() it work corectly.
|
We were not able to replicate this issue. Please provide more details about the issue or share an issue reproducible sample. |
Hi Monisha Sivanthilingam!
Thanks for reply.
1. It's works great. But I found an other way by use beforeAdd request to add current user as resource if not set. By this way, the leader can set resources except them if needed. While the employees do the tasks are set them as resource automaticly and ready for edit without reload data from server. That is acceptable to me.
4. I can't replicate this issue, too. When gantt initializer, it's make first request to server to get data. I use localization, when locale culture is loaded and set to culture globally. So, the gantt should be refresh and make second request. Sometime the view are duplicate while data is not. I fixed this issue by use a flag to post initialized state to server. The first call return empty data from server, when locale culture is loaded I call reload via callback function.
Additional questions:
5. I use self-referential data binding, have a menu called "Add child" inside "Add" menu. When user click Add child I set current TaskId as ParentId of new task, it's works great except the new child task show on top row of grid, not inside parent task. How to fix it? Currently, I call reload data from server after add new child task. It's so bad.
6. I use segments for split task. I want split exact to minute by setting below. But in segments grid, editing control are datepickeredit, the format show correct. When add new segment, end date (ed) is end date of task with minute, while start date (sd) is start date of task without minute. ex: sd: 22/11/2021 07:30 -> 22/11/2021 00:00; ed: 22/11/2021 14:30 -> 22/11/2021 14:30. I can change date but can't change time, it always revert. How to set exact time for segment? When change end date the duration auto calculate and opposite?
Sl.No |
Query |
Syncfusion Comments
| |
1 |
How to design general tab like bootstrap row and col. |
We can make use of the CSS classes to change the structure and arrangement of the fields in the General Tab. The below code snippets demonstrate the solution.
Index.cshtml
| |
2 |
I use self-referential data binding, have a menu called "Add child" inside "Add" menu. When user click Add child I set current TaskId as ParentId of new task, it's works great except the new child task show on top row of grid, not inside parent task. How to fix it? Currently, I call reload data from server after add new child task. It's so bad. |
We have a property called newRowPosition, which we use to define the position in which the new records are to be added. The default value is the Top. However, we can set the value to Child. Then the new records will be added as the child record of the selected record. If no record is selected the record will be added at the top.
| |
3 |
I use segments for split task. I want split exact to minute by setting below. But in segments grid, editing control are datepickeredit, the format show correct. When add new segment, end date (ed) is end date of task with minute, while start date (sd) is start date of task without minute. ex: sd: 22/11/2021 07:30 -> 22/11/2021 00:00; ed: 22/11/2021 14:30 -> 22/11/2021 14:30. I can change date but can't change time, it always revert. How to set exact time for segment? When change end date the duration auto calculate and opposite?
|
We have analyzed this and have confirmed it as a bug from our side. We have logged a bug report for it. You can track its status from the below feedback link.
The fix will be provided in the upcoming 2021 Volume 4 release scheduled for the mid of December, 2021. |