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. Image for the cookie policy date

Hide ScheduleResources on Schedule

How to hide ScheduleResources on Schedule, but I want it exist for Add new Event

9 Replies

RA Riyan Afriyanto July 20, 2019 05:19 AM

img like this

Attachment: Sch_resource_1f007ec7.zip


AP Arun Palaniyandi Syncfusion Team July 22, 2019 07:46 AM

Hi Riyan , 
Thanks for contacting Syncfusion support. 
Kindly remove the ScheduleGroup property (as highlighted) to render default Schedule in UI and to display resource option only in editor window.  
 

<EjsSchedule ID="schedule" Width="100%" Height="650px" SelectedDate="new DateTime(2018, 3, 4)">
  <ScheduleGroup Resources="@GroupData"></ScheduleGroup>   // don’t give 
            <ScheduleResources>                <ScheduleResource DataSource="@ResourceData" Field="AirlineId" Title="Airline Name" Name="Airlines" TextField="AirlineName" IdField="AirlineId" ColorField="AirlineColor" AllowMultiple="true"></ScheduleResource>            </ScheduleResources>            <ScheduleEventSettings DataSource="@GenerateEvents()">                <ScheduleField>                    <FieldSubject Title="Travel Summary" Name="Subject"></FieldSubject>                    <FieldLocation Title="Place" Name="Location"></FieldLocation>                    <FieldDescription Title="Comments" Name="Description"></FieldDescription>                    <FieldStartTime Title="Departure Time" Name="StartTime"></FieldStartTime>                    <FieldEndTime Title="Arrival Time" Name="EndTime"></FieldEndTime>                </ScheduleField>            </ScheduleEventSettings>        </EjsSchedule>
 




Please let us know if you need further assistance.  

Regards,  
Arun P.  



RA Riyan Afriyanto July 22, 2019 10:12 PM

Hi Arun,
thank you for your answer. But can I create 2 resource option in editor window, like as parent to child dropdown

I've follow your code, but It's cannot to create 2 resource option


AP Arun Palaniyandi Syncfusion Team July 24, 2019 06:20 AM

Hi Riyan, 

Thanks for your update. 

Based on your requirement, we have modified our previous sample to display parent-child resource options in editor window. 
 

  <div class="content-wrapper">
        <EjsSchedule ID="schedule" Width="100%" Height="650px" SelectedDate="new DateTime(2018, 4, 4)" CurrentView="View.TimelineWeek">
            <ScheduleResources>
 
// 2 resources
                <ScheduleResource DataSource="@ProjectData" Field="ProjectId" Title="Choose Project" Name="Projects" TextField="text" IdField="id" ColorField="color"></ScheduleResource>
                <ScheduleResource DataSource="@TaskData" Field="TaskId" Title="Category" Name="Categories" TextField="text" IdField="id" GroupIDField="groupId" ColorField="color" AllowMultiple="true"></ScheduleResource>

            </ScheduleResources>
            <ScheduleViews>
                <ScheduleView Option="View.TimelineDay"></ScheduleView>
                <ScheduleView Option="View.TimelineWeek"></ScheduleView>
                <ScheduleView Option="View.TimelineWorkWeek"></ScheduleView>
                <ScheduleView Option="View.TimelineMonth"></ScheduleView>
                <ScheduleView Option="View.Agenda"></ScheduleView>
            </ScheduleViews>
            <ScheduleEventSettings DataSource="@Data.GetResourceData()"></ScheduleEventSettings>
        </EjsSchedule>
    </div>
</div>
 
  
  

@functions{
 
  
    static ScheduleData Data = new ScheduleData(); 
  
    public string[] GroupData = new string[] { "Projects", "Categories" };
    private List<object> ProjectData { get; set; } = new List<object> {
        new {text = "PROJECT 1", id= 1, color= "#cb6bb2"},
        new {text = "PROJECT 2", id= 2, color= "#56ca85"},
        new {text = "PROJECT 3", id= 3, color= "#df5286"}
    };
    private List<object> TaskData { get; set; } = new List<object> {
        new { text = "Nancy", id= 1, groupId = 1, color = "#df5286" },
        new { text = "Steven", id= 2, groupId = 1, color = "#7fa900" },
        new { text = "Robert", id= 3, groupId = 2, color = "#ea7a57" },
        new { text = "Smith", id= 4, groupId = 2, color = "#5978ee" },
        new { text = "Micheal", id= 5, groupId = 3, color = "#df5286" },
        new { text = "Root", id= 6, groupId = 3, color = "#00bdae" }
    };
 
  
} 

 


Please check the above shared sample and let us know if you need further assistance.  

Regards,  
Arun P.  



RA Riyan Afriyanto July 30, 2019 03:14 AM

Hi Arun, 
  It works for now

  Thank You so much

Regards
  Riyan


RA Riyan Afriyanto July 30, 2019 06:31 AM

there is an example for CRUD operation on schedule from API?


HB Hareesh Balasubramanian Syncfusion Team July 31, 2019 09:43 AM

Hi Riyan, 

Thanks for your update. 

Currently DataManger will not support for WebApiAdaptor, we have already logged the below feature task and will be implemented in Volume 3, 2019 main release which is expected to be rollout by the end of September 2019. 

Alternatively we have prepared a CRUD sample using ODATAV4Adaptor, which can be downloaded from the following link, 

Regards, 
Hareesh 



RA Riyan Afriyanto August 4, 2019 09:24 PM

Hi,
Hareesh

     Thank you for the information


KK Karthigeyan Krishnamurthi Syncfusion Team August 4, 2019 11:50 PM

Hi Ryan, 

Most welcome 😊 

Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon