RadiantQ jQuery Gantt Package
How to refresh Gantt with new data with new schema ?
Previous Topic  Next Topic 

Refreshing with new data with new schema

To refresh gantt with a new schema (data source has different bound property names) you have to set the DataSource of GanttControl to null first, reset DataSource property again with the new data and also reset all other binding settings as well. Check the below code.


                // First set the source to null and then set all binding properties and the set the new source.

                $gantt_container.GanttControl("option", "DataSource", null);

                $gantt_container.GanttControl({

                    WorkTimeSchedule: getSelectedSchedule($schedule.val()),

                    IDBinding: new RadiantQ.BindingOptions("TaskID"),

                    NameBinding: new RadiantQ.BindingOptions("TaskName"),

                    IndentLevelBinding: new RadiantQ.BindingOptions("TaskIndentLevel"),

                    StartTimeBinding: new RadiantQ.BindingOptions("TaskStartTime"),

                    EffortBinding: new RadiantQ.BindingOptions("TaskEffort"),

                    PredecessorIndicesBinding: new RadiantQ.BindingOptions("TaskPredecessorIndices"),

                    ProgressPercentBinding: new RadiantQ.BindingOptions("TaskProgressPercent"),

                    DescriptionBinding: new RadiantQ.BindingOptions("TaskDescription"),

                    DataSource: data

                });

    









� RadiantQ 2022. All Rights Reserved.