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

Number of week

Hi,

I need show number of week.
How can I do this?
I saw this command headerRow.Option(HeaderRowType.Week).Template("#week-template").Add();
but i didn't implemented successfully.
If you have annother implementation, I could like see, because I could like show the number in the same header, not in the new line header
thanks.

Resgards
Edson Tanaka.

5 Replies

VM Vengatesh Maniraj Syncfusion Team January 22, 2020 07:09 AM UTC

Hi Edson, 

Greetings from Syncfusion Support. 

Based on the requirement, we have prepared the below sample for week number template. 


Kindly try the above sample and revert us for further assistance. 

Regards, 
Vengatesh 



ET Edson Tsuyoshi Tanaka January 22, 2020 09:51 AM UTC

Hi,
Thanks for sample, I was successful, but... can I use headerrows with the view different of timeline?

@(Html.EJS().Schedule("schedule").Width("100%").Height("743px")
.HeaderRows(headerRow => { headerRow.Option(HeaderRowType.Week).Template("#week-template").Add(); headerRow.Option(HeaderRowType.Date).Add(); })
.Resources(res => { res.DataSource(ViewBag.Owners).Field("OwnerId").Title("Assignee").Name("Owners").TextField("text").IdField("id").ColorField("color").AllowMultiple(true).Add(); })
.AllowDragAndDrop(false)
.AllowResizing(false)
.Readonly(true)
.CurrentView(View.Week)
.RowAutoHeight(true)
.EventRendered("onEventRendered")
.Locale("pt-PT")
.Views(view =>
{
view.Option(View.Day).DisplayName("Dia").Group(group => group.Resources(ViewBag.Resources)).Add();
view.Option(View.Week).DisplayName("Semana").Add();
view.Option(View.Month).DisplayName("Mês").Add();
view.Option(View.Agenda).DisplayName("Agenda").Add();
}
)
.Render()
)

I like this effect



Regards
Edson Tanaka.


VM Vengatesh Maniraj Syncfusion Team January 23, 2020 06:53 AM UTC

Hi Edson, 

Thanks for the update. 

Q1: We could not use the headerRows property with the views different of Timeline. For more reference about headerRows please find our UG documentation link below 


Q2: We can format and change the default appearance of  the events by making use of template option which is available within the eventSettings property. Based on the requirement we have prepared the sample which is available in below link. 

Views(view => { view.Option(View.Week).EventTemplate("#event-template").Add(); 


Kindly try the above and revert us for further assistance. 

Regards, 
Vengatesh. 



ET Edson Tsuyoshi Tanaka January 23, 2020 10:45 AM UTC

Hi,
Thanks.
I had an idea with your sample.
In this option EventTemplate ("# event-template"), I found this option DateHeaderTemplate ("# day-template").
With that, I can customize what I want to display

Regards,
Edson Tanaka


VM Vengatesh Maniraj Syncfusion Team January 24, 2020 05:47 AM UTC

Hi Edson, 

Thanks for the update. 

We are happy that your requirement has fulfilled. 

Kindly revert us for further assistance. 

Regards, 
Vengatesh 


Loader.
Live Chat Icon For mobile
Up arrow icon