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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Saving additional Non-default property

Thread ID:

Created:

Updated:

Platform:

Replies:

121422 Dec 13,2015 07:05 AM UTC Dec 15,2015 04:10 AM UTC ASP.NET MVC 1
loading
Tags: Gantt
Prasanth
Asked On December 13, 2015 07:05 AM UTC

Hi there,

I have a requirement where I have few more additional properties to save along with Gantt's task.  For example Tasks are associated with a parent project.  Gantt chart for individual projects are meant to be seen access through URL e.g. /tasks/projectId=2.  Now I want to associate new tasks with the project (project id).  Is there a cleaner way to achieve this i.e. using the Query property (I have done this with links girds etc, but having trouble with Gantt), so in the corresponding Add & Update controller methods other than viewmodel object an additional parameter (e.g. projectId) could be passed on.  Or is there any otherway

Also to show additional properties I believe you can use .AddDialogFields() .EditDialogFields() methods to show the non-default fields, however how can you keep the original fields while adding new fields to the bottom of the add/edit task dialog.

Regards
Prasanthan

Jayakumar Duraisamy [Syncfusion]
Replied On December 15, 2015 04:10 AM UTC

Hi Prasanthan,
Thanks for using Syncfusion Product.

Query
Solution
1
Gantt chart for individual projects are meant to be seen access through URL e.g. /tasks/projectId=2.  Now I want to associate new tasks with the project (project id). 
Using Load action method add non-default columns at the load time.

columns.splice(0, 0,

        {

            field: "ProjectId",

            headerText: "ProjectID",

            mappingName:"ProjectId",

            columnTemplate: true,

            templateId: "columnTemplate",

            width: "200px"
        });

2
 Is there a cleaner way to achieve this i.e. using the Query property (I have done this with links girds etc, but having trouble with Gantt), so in the corresponding Add & Update controller methods other than viewmodel object an additional parameter (e.g. projectId) could be passed on. 
By using ajax post, we can Add or Update Controller methods.

$.ajax({

      type: "POST",

      url: "/Gantt/Add                   

      data: ganttRecord,

      ataType: "json"
       });

3
Show additional properties I believe you can use .AddDialogFields() .EditDialogFields() methods to show the non-default fields, however how can you keep the original fields while adding new fields to the bottom of the add/edit task dialog.
Once we add non-default columns at the load time then no need to use in AddDialogFields or EditDialogFieds method. When add new fields then it will dynamically add to the bottom of the original fields in add/edit dialog


We have also prepared a sample with fulfil your queries. Please find the sample in the following URL.

Sample URL: http://www.syncfusion.com/downloads/support/forum/121422/ze/MVCsampleSQL1132617458
Please let us know if you require further assistance on this.

Regards

Jayakumar Duraisamy

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.

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

;