RadiantQ jQuery Gantt Package
How to pass some AjaxSettings to ajax in MVC?
Previous Topic  Next Topic 

In MVC wrapper all the sever calls are initiated from our soruce, so if you need to pass some options to ajax use the AjaxSettings property.


<script type="text/javascript">


    var AjaxSettings =

    {

        dataType: 'xml text',

        converters:

        {

            "xml text": function (data) {

                console.log(data);

                // We use te xml2json jquery plugin to convert xml to json.

                var json = $.xml2json(data).XMLTaskInfo;


                return $.parseJSON(window.JSON.stringify(json), true

                /*converts date strings to date objects*/

                , true

                /*converts ISO dates to local dates*/

                );

            }

        }

    };

       

</script> 


@Html.JQProjectGantt(

        new JQProjectGanttSettings()

        {               

            ControlId = "gantt_container",

            DataSourceUrl = new Uri("/Home/GetProjectGanttXMLItemsource", UriKind.RelativeOrAbsolute),

            AjaxSettings="AjaxSettings" ,

            Options = new ProjectGanttOptions()

            {

                AnchorTime = DateTime.Today,

                BaseTimeUnitWidth = 50,

                RowHeight = 25,

                WorkTimeSchedulenull,                           

                FlatActivitiesListCreated = "FlatActivitiesListCreated",

            }              

})




� RadiantQ 2022. All Rights Reserved.