Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    Schedule / Resource Grouping
    <%@ Page Title="Schedule-Vertical View-ASP.NET-SYNCFUSION"   Language="C#" MetaDescription="This example shows how the calendars of multiple resources are grouped in default view layouts in the ASP.NET Web Scheduler." MasterPageFile="~/Samplebrowser.Master" AutoEventWireup="true" CodeBehind="ResourceGrouping.aspx.cs" Inherits="WebSampleBrowser.Schedule.ResourceGrouping" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="SampleHeading" runat="server">
        <span class="sampleName">Schedule / Resource Grouping</span>
    </asp:Content>
    
    <asp:Content ID="ControlContent" runat="server" ContentPlaceHolderID="ControlsSection">
        <div>
    <ej:Schedule ClientIDMode="Static" runat="server" ID="Schedule1" DataSourceID="SqlData" Width="100%" Height="525px" CurrentDate="6/5/2017" CurrentView="Workweek">
        <Resources>
            <ej:Resources Field="RoomId" Name="Rooms" Title="Room" AllowMultiple="true">
                <ResourceSettings Color="color" Id="id" Text="text">
                </ResourceSettings>
            </ej:Resources>
            <ej:Resources Field="OwnerId" Name="Owners" Title="Owner" AllowMultiple="true">
                <ResourceSettings Color="color" Id="id" Text="text" GroupId="groupId">
                </ResourceSettings>
            </ej:Resources>
             
        </Resources>
        <Group Resources="Rooms,Owners"/>
        <AppointmentSettings Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Description="Description" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" ResourceFields="RoomId,OwnerId"/>
    </ej:Schedule>
        </div>
        <asp:SqlDataSource ID="SqlData" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>"
                SelectCommand="SELECT * FROM [MultipleResource]"></asp:SqlDataSource>
    </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.Schedule
    {
        public partial class ResourceGrouping : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                List<WebSampleBrowser.Schedule.multipleresource.Rooms> owner = new List<WebSampleBrowser.Schedule.multipleresource.Rooms>();
                List<WebSampleBrowser.Schedule.multipleresource.Rooms> rooms = new List<WebSampleBrowser.Schedule.multipleresource.Rooms>();
                rooms.Add(new WebSampleBrowser.Schedule.multipleresource.Rooms { text = "Room 1", id = "1", color = "#cb6bb2" });
                rooms.Add(new WebSampleBrowser.Schedule.multipleresource.Rooms { text = "Room 2", id = "2", color = "#56ca85" });
    
                owner.Add(new WebSampleBrowser.Schedule.multipleresource.Rooms { text = "Nancy", id = "1", groupId = "1", color = "#ffaa00" });
                owner.Add(new WebSampleBrowser.Schedule.multipleresource.Rooms { text = "Steven", id = "3", groupId = "2", color = "#f8a398" });
                owner.Add(new WebSampleBrowser.Schedule.multipleresource.Rooms { text = "Michael", id = "5", groupId = "1", color = "#7499e1" });
    
                Schedule1.Resources[0].ResourceSettings.DataSource = rooms;
                Schedule1.Resources[1].ResourceSettings.DataSource = owner;
            }
        }
    }