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.
Syncfusion Feedback

Multiple views with same Option but different intervals

Thread ID:

Created:

Updated:

Platform:

Replies:

146331 Jul 31,2019 04:00 PM UTC Aug 2,2019 07:18 AM UTC Angular - EJ 2 4
loading
Tags: Schedule
Corina Ivanov
Asked On July 31, 2019 04:00 PM UTC

Hi,

I have encountered the following scenario: I need to have a Day view and a 3Days view and I could not find a way to do so using the views of the scheduler,
I have tried 2 possible solutions: 
  • Defining 2 views with Option Day with different display names, name property and interval.
  • Defining one single view with Option Day and binding the displayName and interval to custom properties from my implementation
However, none if this seems to work well as the scheduler is not refreshed when the interval changes or when I set the currentView to the displayName of 3 Days.

Could you guide me in the right direction to achieve this?

Thank you,
Corina


Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 1, 2019 04:31 AM UTC

Hi Corina, 
 
Syncfusion greetings. 
 
We can achieve your requirement using option and interval options like below. 
 
<e-views> 
      <e-view displayName='Day' option='Day'></e-view> 
      <e-view displayName='3 Days' option='Day' [interval]="dayInterval"></e-view> 
    </e-views> 
 
Regards, 
Karthi 
 


Corina Ivanov
Replied On August 1, 2019 12:24 PM UTC

Hi Karthi,

Thank you for your reply.
However, this does not work as expected.
My situation is as follows: I have disabled the scheduler header as I have to handle the view type change in custom header.
In this case I am trying to set the currentView to a value that differentiates between Day and 3Days.
I first tried to use the binding for currentView but this does not work as it accepts only 'Day', 'Week', etc but nothing custom for ThreeDays.
Then I tried using the following method, by passing 0 or 1 as index but no luck either. When I set viewIndex 1 it returns with viewIndex 0 after render and nothing changes. 
this.scheduler.changeView('Day', null, null, 0);
this.scheduler.changeView('Day', null, null, 1);
I have also looked in SF code and it looks that Schedule.setViewOptions resets the viewIndex.
My views are defined as follows:
<e-views>
<e-view option="Day" displayName="Day" [group]="grouping">
</e-view>
<e-view option="Day" displayName="ThreeDays" interval="3">
</e-view>
<e-view option="Week" displayName="Week"></e-view>
<e-view option="Agenda" displayName="Agenda" [allowVirtualScrolling]="true"></e-view>
</e-views>
Please let me know if you have any ideas how I could proceed further.
I am currently evaluation the Scheduler by comparison with other solutions on the market and by EOW we need to take a decision.
Thanks,
Corina

Corina Ivanov
Replied On August 1, 2019 04:44 PM UTC

I found a solution for this.
When changing the view I have to set the param 'muteOnChange true.


Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 2, 2019 07:18 AM UTC

Hi Corina, 
 
We're glad to hear you've solved the problem. For further help, please let us know. 
 
Regards, 
Karthi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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