Sl. No. |
Query |
Syncfusion Comments | |
1 |
Show the add dialog when the user right-clicks the context menu and selects Add |
We have achieved this requirement by the use of the contextMenuClick event and opened the add dialog when the item clicked is Add. The following code snippets demonstrate the solution.
| |
2 |
how can we hide the ID label and textbox or re-arrange the HTML inputs of the add dialog. |
We can limit the fields to be displayed in each tab or rearrange them using the editDialogFields or addDialogFields property. The following code snippets demonstrate the solution.
|
Thanks for that Monisha.1) Is there a way to add validations to the fields we add into the General Tab?2) Now I can open the dialog when clicking on Child, Below and Above. The question now is how can I position the new task as such when I hit the save button in the dialog?3) Is there a way to hide any of the sub options (Above, Child, Child, Milestone) for specific tasks when hovering the Add option?4) The same question as above but with Outdent and Indent.Thanks
S. No |
Query |
Syncfusion comments | |
1. |
Is there a way to add validations to the fields we add into the General Tab? |
Currently, we have validation support in cell editing alone. We can achieve this using validationRules of columns property. Please find the below code example.
Please get the sample from below link.
Please confirm us is this your requirement. If yes, we have logged feature for validation in dialog. The status can be tracked from below feedback link.
As we have already lined up some major features, we could not start its implementation immediately. Please cast your vote to make it count. We will prioritize the features for every release based on demands. | |
2. |
Is there a way to hide any of the sub options (Above, Child, Child, Milestone) for specific tasks when hovering the Add option? |
Do you want to hide that submenu (above, below, child, etc.,) and open the dialog alone? If yes, we can do that some workaround solution using contextMenuOpen and contextMenuClick event. Please refer the below code snippet,
| |
3. |
Now I can open the dialog when clicking on Child, Below and Above. The question now is how can I position the new task as such when I hit the save button in the dialog? |
By using the query 2 (above query), we can hide the sub menu and open the add dialog and we can set the set the position of the newly adding records by setting newRowPosition in the editSettings based on our requirement. Please refer the below code snippet,
| |
4. |
The same question as above but with Outdent and Indent. |
Do you want to hide the indent and outdent items in the context menu? If yes, we can hide that items using the contextMenuOpen event. Please refer the below code snippet,
|
S. No |
Query |
Syncfusion comments | |
|
But when you right click on the third option the submenu doesn’t come up |
Please let us know is this solution working for you? Else are you facing any error on this or do you need to make any customization on this?
Please share is the above details to assist you better. | |
|
I want to get the Cancel event (you can check in actionComplete) It works fine the way I did it but I wonder if there is a better solution since even if I cancel, the item gets inserted into the gantt chart. |
We can restrict the adding of new records using actionBegin event, with the requestType “beforeAdd”. Please refer the below code snippet,
We have prepared a sample for your reference. Please get the sample from below link.
| |
|
Is there a way to validate fields in the general tab with a callback? |
Currently, we have validation support in cell editing alone. We can achieve this using validationRules of columns property. Please find the below code example.
Please get the sample from below link.
Please confirm us is this your requirement. If yes, we have logged feature for validation in dialog. The status can be tracked from below feedback link.
As we have already lined up some major features, we could not start its implementation immediately. Please cast your vote to make it count. We will prioritize the features for every release based on demands. |
Sl. No. |
Query |
Syncfusion Comments |
1 |
Can you please confirm with me if this is a bug or how can I hide those options 'Child' and 'Above' and keep the right click to work as expected? |
We were able to reproduce the reported issue and have considered this as an issue from our side. We have already logged a bug report for this. You can track its status from the below feedback link.
Feedback: https://www.syncfusion.com/feedback/21850/console-error-arises-when-hiding-items-in-context-menu
The fix will be provided in the patch release scheduled for 9th February, 2021.
We appreciate your patience until then.
|
2 |
When I do that the cancel button works fine but the save button does not trigger any event. Is it a bug in the dialog? |
We were unable to reproduce the issue in the sample you provided. The actionBegin event was triggered when hit save and according to the customization you have provided the changes we made to the edited record were not saved. |
S. No |
Queries |
Syncfusion comments |
|
I made the cancel button and save button to work by adding this piece of code |
Thanks for the update. Please contact us if you are facing any issue on this. |
|
Can you please share a sandbox to use so we can check it out? |
As per your requirement, we have prepared a sample for contextMenuItems, where we can add our custom items in the context menu, and we can utilize it based on our requirement. Please get the sample from below link.
Please contact us if you are facing any issue on this. |
contextMenuOpen: function (args) {
args.hideItems.push("Indent");
args.hideItems.push("Outdent");
if (args.parentItem && args.parentItem.properties.text == "Add") {
args.hideChildItems = ["Child", "Above"];
}
}, |