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

TimeScale and ressources group

Thread ID:

Created:

Updated:

Platform:

Replies:

147563 Sep 16,2019 07:34 PM UTC Jan 27,2020 02:45 PM UTC Blazor 4
loading
Tags: Scheduler
NKOUAMBIA CHIMENE
Asked On September 16, 2019 07:34 PM UTC

Hello,

I have some  Questions
1. How can a split Schedule TimeScale so that it Show like this with label
from now, I get this result <ScheduleTimeScale Interval="240" SlotCount="1"></ScheduleTimeScale>

2. Is there a way to label it like 08h - 12h // 12h - 16h ?? how can I split discontinously like 8h - 12h // 13h - 16h ??
3. How can I show the day like Lundi, 11 nov Not 11 nov., lundi
4. In ressource grouping, how can I groupe ressources to have this layout

from now I have this one with the below code
<ScheduleResources>
        <ScheduleResource DataSource="@grappeSalleList" Field="IdGrappeSys" Title="Choose Project" Name="Grappes" TextField="NomGrappe" IdField="IdGrappeSys" ColorField="color"></ScheduleResource>
        <ScheduleResource DataSource="@salleExamenList" Field="IdSalleExamenSys" Title="Salle Examen" Name="SalleExamens" TextField="NomSalle" IdField="IdSalleExamenSys"  GroupIDField="IdGrappeSys" AllowMultiple="true" ColorField="#cb6bb2"></ScheduleResource>
    </ScheduleResources>


Thanks,
Chimène NK.

Nevitha Ravi [Syncfusion]
Replied On September 17, 2019 12:11 PM UTC

Hi Nkouambia, 

Q: How can a split Schedule TimeScale so that it Show like this with label?  Is there a way to label it like 08h - 12h // 12h - 16h ?? how can I split discontinously like 8h - 12h // 13h - 16h ?? 
We can achieve the label 08h - 12h // 12h - 16h using MajorSlotTemplate of scheduler TimeScale and it is not feasible with current architecture of Scheduler to discontinue the hours. 
 
        <ScheduleTimeScale Interval="240" SlotCount="1"> 
            <MajorSlotTemplate> 
                @{ 
                    var currTime = majorSlotTemplate((context as TemplateArgs).Date); 
                    var nextTime = Convert.ToInt32(currTime) + 4; 
                    <div>@(currTime + "h - " + nextTime + "h")</div> 
                } 
            </MajorSlotTemplate> 
        </ScheduleTimeScale> 
 
    public static string majorSlotTemplate(DateTime date) 
    { 
       return date.ToString("hh", frFr); 
    } 

Q: How can I show the day like Lundi, 11 nov Not 11 nov., lundi 
We can change the date format of the header using DateHeaderTemplate, please refer the following code. 
 
            <DateHeaderTemplate> 
                <div class="date-text">@(getDateHeaderText((context as TemplateArgs).Date))</div> 
            </DateHeaderTemplate> 
.. 
    static CultureInfo frFr = new CultureInfo("fr-FR"); 
    public static string getDateHeaderText(DateTime date) 
    { 
        return date.ToString("dddd, dd MMM", frFr); 
    } 

 
Q:  In ressource grouping, how can I groupe ressources to have this layout 
By default, our scheduler has the hierarchy layout for multilevel resource grouping in Timeline views, so it is not feasible with current architecture of our Scheduler to achieve the exact shared layout. 

Regards, 
Nevitha 


NKOUAMBIA CHIMENE
Replied On September 17, 2019 01:57 PM UTC

Hello Nevitha,
thanks for Answer it works for me, 
but it looks like ResourceColorField doesn't work with Timeline or I'm missing something. This is a part of my code but it doesnt show "Grappes" Color in event

<EjsSchedule TValue="AppointmentData" ModelType="@Model" Width="100%" Height="650px" SelectedDate="@(DateTime.Now.Date)" ShowWeekend="false" CurrentView="View.TimelineWeek" FirstDayOfWeek=1  StartHour="08:00" EndHour="16:00" >
<ScheduleGroup Resources="@Resources" ></ScheduleGroup>
    <ScheduleResources>
        <ScheduleResource DataSource="@grappeSalleList" Field="IdGrappeSys" Title="Choose Project" Name="Grappes" TextField="NomGrappe" IdField="IdGrappeSys" ColorField="color" AllowMultiple="false"></ScheduleResource>
        <ScheduleResource DataSource="@salleExamenList" Field="IdSalleExamenSys" Title="Salle Examen" Name="SalleExamens" TextField="NomSalle" IdField="IdSalleExamenSys" GroupIDField="IdGrappeSys" AllowMultiple="true" ColorField="#cb6bb2"></ScheduleResource>
    </ScheduleResources>
    <ScheduleViews>
        <ScheduleView Option="View.TimelineWeek"  DateFormat="dd-MMM-yyyy" StartHour="08:00" EndHour="16:00"></ScheduleView>
        <ScheduleView Option="View.TimelineMonth" ></ScheduleView>
        <ScheduleView Option="View.Agenda"></ScheduleView>
    </ScheduleViews>
 <ScheduleEventSettings DataSource="@DataSource" EnableTooltip="true" ResourceColorField="Grappes">
        <ScheduleField>
            <FieldSubject Name="Subject" Title="Summary"></FieldSubject>
            <FieldDescription Name="Description" Title="Comments"></FieldDescription>
        </ScheduleField>         
    </ScheduleEventSettings>   
    <ScheduleEvents TValue="AppointmentData" ActionCompleted="OnActionCompleted"></ScheduleEvents> 
</EjsSchedule>
@code{
public string[] Resources { get; set; } = new string[] {"Grappes", "SalleExamens"};
private List<object> grappeSalleList{ get; set; } = new List<object>
{
new { NomGrappe = "Gynecologie", IdGrappeSys= 1, color = "#df5286" },
new  { NomGrappe = "Pediatrie", IdGrappeSys= 2, color = "#7fa900" }
};
 
private List<object> salleExamenList{ get; set; } = new List<object>
{
new { IdSalleExamenSys = 1, NomSalle = "Salle01", IdGrappeSys= 1},
new { IdSalleExamenSys = 2, NomSalle = "Salle02", IdGrappeSys= 1},
new  { IdSalleExamenSys = 3, NomSalle = "Salle03", IdGrappeSys= 2}
};

}

Thanks,
Chimène NK.

Nevitha Ravi [Syncfusion]
Replied On September 18, 2019 04:06 PM UTC

Hi Nkouambia, 

Thanks for your update. We are happy that our provided solution helps you. 

Currently ResourceColorField option does not support timeline view which is the cause for the reported problem and we have logged the bug report for the same which can be tracked from the following link.  

The fix will be included in our upcoming bi-weekly patch release expected to be rolled out at the end of September. We would appreciate your patience until then. 

Regards, 
Nevitha 


Alagumeena Kalaiselvan [Syncfusion]
Replied On January 27, 2020 02:45 PM UTC

Hi Nkouambia, 

Sorry for the delay to get back to you! 

We have resolved your reported issue “ResourceColorField does not work with Timeline” and  included with patch release which is promised.  

Refer to the below release notes. 

We will happy to assist you if you need further assistance. 

Regards 
Alagumeena.K 


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