Page 1 of 1

different CSS styles for different events - RESOLVED

Posted: Sat Nov 06, 2010 12:03 pm
by praveen.shastri
Hello Mats,

How do I use different css styles for different events?

Example. System has three kinds of tasks/events PROJECT,LEAVE and TRAVEL. Now For 'project' event I want green color box, for 'leave' i would need yellow color box, for 'travelling' I would need red box.

Is it possible?

Re: different CSS styles for different events

Posted: Sat Nov 06, 2010 12:14 pm
by mats
Very easy :). A good idea is to browse through the online examples and view the source:

http://ext-scheduler.com/examples/G ... uping.html
// Default renderer, supplies data to be applied to the event template
    renderer : function (event, r, row, col, ds) {
        // Add data to be applied to the event template
        return {
            text : event.get('StartDate').format('Y-m-d'),
            cls : r.get('Category') // This gets added to the containing event DOM node
        };
    },