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.
Unfortunately, activation email could not send to your email. Please try again.

Insert columns during Load

Thread ID:

Created:

Updated:

Platform:

Replies:

128999 Feb 20,2017 11:33 PM Feb 21,2017 08:26 AM JavaScript 1
loading
Tags: ejGantt
Mohan Prasath
Asked On February 20, 2017 11:33 PM

I have the following fields in my DataSource

1.TaskName
2.StartDate
3.EndDate
4.isManual
5. LoadedValue
6. DefaultDate

Though I am binding all the data in GanttChart, only few of the columns are visible. I would like to add few columns during the load of the control. Is there is any possible way to do this? 


Jayakumar Duraisamy [Syncfusion]
Replied On February 21, 2017 08:26 AM

Hi Mohan Prasath,
Please find the response below,
 In Gantt control, we can add custom columns during load time by using “load” client side event. 
Please refer the following code snippet,
$("#GanttContainer").ejGantt({ 
                  //….
                    load: load,
});
function load(args) { 
            var columns = this.getColumns(); 
            var isManual = { 
                field: "isManual",  
                headerText: "IsManual",  
                editType: ej.Gantt.EditingType.String, 
            }; 
            columns.push(isManual);         // Adding Column 1 
            var loadedValue = { 
                field: "loadedValue", 
                headerText: "Loaded Value", 
                editType: ej.Gantt.EditingType.Boolean, 
                visible: false, 
            }; 
            columns.push(loadedValue);      // Adding Column 2 
            var defaultDate = { 
                field: "defaultDate", 
                headerText: "Default Date", 
               editType: ej.Gantt.EditingType.DatePicker, 
                format: dateFormat 
            }; 
            columns.push(defaultDate);}            // Adding Column 3
 We have also prepared a sample for your reference, please find the sample in the following link.
Sample: http://jsplayground.syncfusion.com/Sync_xdkyeron
Regards,
Jayakumar D


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.

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.

;