- Home
- Forum
- ASP.NET MVC - EJ 2
- Events color
Events color
Hy guys,

Using EJ2 Scheduler, VS2017...
Can I use different colors to render different events? I mean, default color is blue, can I changed it?
Thanks!
SIGN IN To post a reply.
5 Replies
KK
Karthigeyan Krishnamurthi
Syncfusion Team
January 10, 2019 04:13 AM UTC
Thank you for contacting Syncfusion support.
Kindly refer the below links to customize the events.
Regards,
Karthigeyan
VA
Vanderlei
January 10, 2019 01:35 PM UTC
Hi Karthigeyan,
It is a little bit time consuming to do it, I'll give a try after developing other project's features...
Many thanks!
BTW, do you have a sample to export appointments (.ics file)?
KK
Karthigeyan Krishnamurthi
Syncfusion Team
January 11, 2019 05:01 AM UTC
Thanks for your update.
In the below sample, event color is customized using EventRendered event in a simple way.
|
@Html.EJS().Schedule("schedule").Width("100%").Height("650px").EventRendered("onEventRendered").EventSettings(new ScheduleEventSettings { DataSource = ViewBag.datasource }).SelectedDate(new DateTime(2018, 2, 15)).Render()
function onEventRendered(args) {
var scheduleObj = document.getElementById('schedule').ej2_instances[0];
applyCategoryColor(args, scheduleObj.currentView);
}
function applyCategoryColor(args, currentView) {
let categoryColor = args.data.CategoryColor; // event field
if (!args.element || !categoryColor) {
return;
}
if (currentView === 'Agenda') {
args.element.firstChild.style.borderLeftColor = categoryColor;
}
else {
args.element.style.backgroundColor = categoryColor;
}
} |
We have validated your requirement and we like to let you know that we have already logged a feature request on this and it can be tracked through our feedback portal below.
It will be implemented in our upcoming Volume 1, 2019 main release which is expected to be rolled out by the mid of March 2019.
If you have any more specification/suggestions to the feature request you can add it as a comment in the portal.
Regards,
Karthigeyan
KK
Karthigeyan Krishnamurthi
Syncfusion Team
March 14, 2019 12:31 PM UTC
Export feature is included in Volume 1, 2019 beta.
Regards,
Karthi
KK
Karthigeyan Krishnamurthi
Syncfusion Team
March 15, 2019 06:35 AM UTC
Please find the below Volume 1, 2019 beta download link.
Regards,
Karthi
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
VA Vanderlei
- Jan 9, 2019 02:22 PM UTC
- Mar 15, 2019 06:35 AM UTC