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. Image for the cookie policy date

Gantt Add Form

Hi,
I just noticed a problem when I use the Add Toolbar button of the Gantt.
When I save the data from the Add Dialog, there is a javascript error:

Riga: 10
Errore: Impossibile recuperare la proprietà 'form' di un riferimento nullo o non definito

When I use the Edit form and then The Add, the error does not appear.

Thanks in advance

     Andrea Perazzolo


5 Replies

JD Jayakumar Duraisamy Syncfusion Team October 30, 2015 01:11 PM UTC

Hi Andrea,
We have already logged a bug report regarding this issue and we have fixed it, we have created a support incident under your account to track the status of this issue.
Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you require further assistance on this.

Regards,

Jayakumar Duraisamy


AP Andrea Perazzolo November 13, 2015 10:19 AM UTC

Hi,
I have noticed that when I add a new record in the Gantt, in the Add form all the dates included are valued from the first record present in the Gantt.
There is a way to intercept the Starting of the open Dialog and set the values of the record I am adding?
I have some dates that I need to start with a Null Value.
There are the BeginEdit Event, but not a Begin Add or an ActionBegin for the Add operation.

    Thanks in advance

    Andrea Perazzolo



MK Mahalakshmi Karthikeyan Syncfusion Team November 16, 2015 08:55 AM UTC

Hi Andrea,

We can interact with Add dialog elements before it save to dataSource using “ActionBegin” client side event. Please refer the following code example for details.

@(Html.EJ().Gantt("Gantt").

//…

ClientSideEvents(cl =>

       {

           cl.ActionBegin("ActionBegin");

       }).

)

<script type="text/javascript">

        function ActionBegin(args) {

            if (args.requestType == "save") {

                args.data.Name = "Dynamically Edited";

                args.data.EndDate = "2/27/2014";

            }

        }

</script>

We have also prepared a sample based on this and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/AddDialog1078207201

Regards,

Mahalakshmi K.



AP Andrea Perazzolo November 16, 2015 09:06 AM UTC

Hi, thanks for the reply, but my problem is at the start of the Add Dialog, and not on Save.
I need some dates to be set to null  at the start of the dialog (in my model are of type DateTime?).
This solution allow me to interact before the Add is completed.
At the moment all the dates are set to the values present  in the first record.

    Thanks in advance

    Andrea Perazzolo


MK Mahalakshmi Karthikeyan Syncfusion Team November 17, 2015 12:48 PM UTC

Hi Andrea,

At present there is no support for event to trigger before the Dialog box get rendered. Hence have already logged and working on the Usability feature regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Please let us know if you need further assistance on this.

Regards,

Mahalakshmi K.


Loader.
Up arrow icon