)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

What are the available editors in Gantt columns

Platform: jQuery |
Control: ejGantt |
Published Date: August 3, 2017 |
Last Revised Date: May 29, 2019

Besides default columns generated by the Gantt control, a user can also add custom columns with the below edit types, using load client side event.

The list of editors available in Gantt for custom columns are:

  1. String
  2. Numeric
  3. Drop down
  4. Boolean
  5. Currency
  6. Percentage
  7. Mask Edit

Please refer the below code snippets for more details.

<body>
    <div id="Gantt" style="position: absolute;"></div>
    <script type="text/javascript">
      $(function () {
        $("#Gantt").ejGantt({
            //...
            load: load
        });
    });
           //Sample Data for dropdown box
           var dropDownData = [
                   { text: "Open", value: "Open" },
                   { text: "Progress", value: "Progress" },
                   { text: "Testing", value: "Testing" },
                   { text: "Completed", value: "Completed" }];
           function load(args) {
                var columns = this.getColumns();
                //Checkbox column with boolean edit 
                columns.push(
                    {
                        field: "State",
                        headerText: "State",
                        editType: "booleanedit",
                        mappingName: "State",
                        width: "180px",
                    });
                //Column with drop down list 
                columns.push(
                    {
                        field: "TaskStatus",
                        headerText: "Task Status",
                        editType: "dropdownedit",
                        mappingName: "TaskStatus",
                        dropdownData: dropDownData,
                        width: "180px",
                    });
                //Column with String text box
                columns.push(
                    {
                        field: "Description",
                        headerText: "Description",
                        editType: "stringedit",
                        mappingName: "Description",
                        width: "180px",
                    });
                //Column with Numeric textbox
                columns.push(
                {
                    field: "Value",
                    headerText: "Value",
                    editType: "numericedit",
                    mappingName: "Value",
                    width: "180px",
                });
                //Column with NumericEdit currency textbox
                columns.push(
                {
                    field: "Amount",
                    headerText: "Total",
                    editType: "numericedit",
                    mappingName: "Amount",
                    width: "180px",
                    format: "{0:C2}"
                });
                //column with NumericEdit percentage textbox
                columns.push(
                    {
                        field: "Percentage",
                        headerText: "Percentage",
                        editType: "numericedit",
                        mappingName: "Percentage",
                        width: "180px",
                        format: "{0:P0}",
                        editParams: { decimalPlaces: 2, incrementStep: 0.01 }
                    });
                //column with mask edit textbox
                columns.push(
                    {
                        field: "MaskedColumn",
                        headerText: "Masked Text",
                        editType: "maskedit",
                        mappingName: "MaskedColumn",
                        width: "180px",
                        editParams: { maskFormat: "9999" }
                    });
            }           
        </script>
</body>      

Sample link

A sample for updating the dimensions of Gantt chart is available in the following link. Sample

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon