Articles in this section
Category / Section

What are the available editors in Gantt columns in .NET WebForms?

3 mins read

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.

Code snippets:

[ASP]
<body>
    <form id="form1" runat="server"
        <ej:Gantt ID="Gantt" runat="server"
         //...
        Load="Load">
        </ej:Gantt>
        <script type="text/javascript">
            //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>
    </form>
</body>
      

 

Sample link

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

 

Note:

A new version of Essential Studio for ASP.NET is available. Versions prior to the release of Essential Studio 2014, Volume 2 will now be referred to as a classic versions.The new ASP.NET suite is powered by Essential Studio for JavaScript providing client-side rendering of HTML 5-JavaScript controls, offering better performance, and better support for touch interactivity. The new version includes all the features of the old version, so migration is easy.

The Classic controls can be used in existing projects; however, if you are starting a new project, we recommend using the latest version of Essential Studio for ASP.NET. Although Syncfusion will continue to support all Classic Versions, we are happy to assist you in migrating to the newest edition.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls. If you have any queries or require clarifications, please let us know in the comments section below.

You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied