Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    Gantt / ColumnChooser
    <%@ Page Title="Gantt-Column Menu-ASP.NET-SYNCFUSION"   Language="C#" MetaDescription="This example illustrates the column menu in the Syncfusion Gantt chart control for sorting, filtering, and toggling column visibility options." AutoEventWireup="true" MasterPageFile="~/Samplebrowser.Master" CodeBehind="ColumnChooser.aspx.cs" Inherits="WebSampleBrowser.Gantt.ColumnChooser" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="SampleHeading" runat="server">
        <span class="sampleName">Gantt / ColumnChooser</span>
    </asp:Content>
    
    <asp:Content ID="ControlContent" runat="server" ContentPlaceHolderID="ControlsSection">
        <div>
            <ej:Gantt ID="GanttControlColumnChooser" runat="server" AllowSelection="true" AllowColumnResize="false"
                TaskIdMapping="Id" TaskNameMapping="Name" ScheduleStartDate="02/23/2017" ScheduleEndDate="03/30/2017"
                StartDateMapping="StartDate" EndDateMapping="EndDate" ProgressMapping="PercentDone"
                ChildMapping="Children" TreeColumnIndex="1" AllowGanttChartEditing="false" ShowColumnChooser="true" 
                ShowColumnOptions="true" ColumnDialogFields="field,headerText,editType,width,textAlign"
                AllowSorting="true" AllowMultiSorting="true" SplitterPosition="50%" IsResponsive="true" Load="load">
                <EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" AllowIndent="true" EditMode="cellEditing" />
                <SizeSettings Width="100%" Height="450px" />            
            </ej:Gantt>
        </div>
    </asp:Content>
    <asp:Content ID="Content3" runat="server" ContentPlaceHolderID="ScriptSection">
        <script type="text/javascript">
        function load(args) {
            this.getColumns()[0].width = 100;
        }
     </script>
        </asp:Content>
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    
    namespace WebSampleBrowser.Gantt
    {
        public partial class ColumnChooser : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                var DataSource = this.GetDataSource();
                this.GanttControlColumnChooser.DataSource = DataSource;
                this.GanttControlColumnChooser.DataBind();
            }
            #region Create DataSource for Gantt control
            public List<BusinessObject> GetDataSource()
            {
                List<BusinessObject> list = new List<BusinessObject>();
                list.Add(new BusinessObject()
                {
                    Id = 1,
                    Name = "Parent Task 1",
                    StartDate = "02/27/2017",
                    EndDate = "03/03/2017",
                    PercentDone = "40",
                    Children = (new List<BusinessObject>()
                        {
                            new BusinessObject()
                            {
                                Id = 2,
                                Name = "Child Task 1",
                                StartDate = "02/27/2017",
                                EndDate = "03/03/2017",
                                PercentDone = "40",
                            },
                            new BusinessObject()
                            {
                                Id = 3,
                                Name = "Child Task 2",
                                StartDate = "02/27/2017",
                                EndDate = "03/03/2017",
                                PercentDone = "40"
                            },
                            new BusinessObject()
                            {
                                Id = 4,
                                Name = "Child Task 3",
                                StartDate = "02/27/2017",
                                EndDate = "03/03/2017",
                                Duration = 5,
                                PercentDone = "40"
                            }
                        })
    
                });
    
                list.Add(new BusinessObject()
                {
                    Id = 5,
                    Name = "Parent Task 2",
                    StartDate = "03/06/2017",
                    EndDate = "03/10/2017",
                    PercentDone = "40",
                    Children = (new List<BusinessObject>()
                        {
                            new BusinessObject()
                            {
                                Id = 6,
                                Name = "Child Task 1",
                                StartDate = "03/06/2017",
                                EndDate = "03/10/2017",
                                PercentDone = "40",
                            },
                            new BusinessObject()
                            {
                                Id = 7,
                                Name = "Child Task 2",
                                StartDate = "03/06/2017",
                                EndDate = "03/10/2017",
                                PercentDone = "40",
                            },
                            new BusinessObject()
                            {
                                Id = 8,
                                Name = "Child Task 3",
                                StartDate = "03/06/2017",
                                EndDate = "03/10/2017",
                                PercentDone = "40",
                            },
                             new BusinessObject()
                            {
                                Id = 9,
                                Name = "Child Task 4",
                                StartDate = "03/06/2017",
                                EndDate = "03/10/2017",
                                PercentDone = "40",
                            }
                        })
    
                });
                list.Add(new BusinessObject()
                {
                    Id = 10,
                    Name = "Parent Task 3",
                    StartDate = "03/13/2017",
                    EndDate = "03/17/2017",
                    PercentDone = "40",
    
                    Children = (new List<BusinessObject>()
                        {
                            new BusinessObject()
                            {
    
                                Id = 11,
                                Name = "Child Task 1",
                                StartDate = "03/13/2017",
                                EndDate = "03/17/2017",
                                Duration = 5,
                                PercentDone = "40"
                            },
                            new BusinessObject()
                            {
                                Id = 12,
                                Name = "Child Task 2",
                                StartDate = "03/13/2017",
                                EndDate = "03/17/2017",
                                PercentDone = "40",
                            },
                            new BusinessObject()
                            {
                                Id = 13,
                                Name = "Child Task 3",
                                StartDate = "03/13/2017",
                                EndDate = "03/17/2017",
                                PercentDone = "40"
                            }
                        })
    
                });
    
                return list;
            }
            #endregion
    
            #region BusinessObject Creation
            public class BusinessObject
            {
                public string StartDate { get; set; }
                public string EndDate { get; set; }
                public int Id { get; set; }
                public string Name { get; set; }
                public int Duration { get; set; }
                public string PercentDone { get; set; }
                public List<object> ResourceID { get; set; }
                public List<BusinessObject> Children { get; set; }
                public string Predescessor { get; set; }
    
            }
            #endregion
        }
    }