This is a migrated thread and some comments may be shown as answers.

[Solved] css for resources

5 Answers 132 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nyceane
Top achievements
Rank 1
Nyceane asked on 21 Feb 2008, 08:05 AM
ok, when I trace this, e.Appointment is available and e.Appointment.Resources is null, I am under a content page I dont know whether it has anything to do with it.  RadScheduler1.Resources have all the resources available, is there any other way to change colors for the resources? or this problem have been encountered before. thank you


    protected void RadScheduler1_AppointmentColor(object sender, AppointmentCreatedEventArgs e) 
    { 
        /*foreach (Resource resource in e.Appointment.Resources) 
            { 
                if (resource.Type == "Status") 
                { 
                    e.Appointment.CssClass = resource.Text.Replace(' ', '_'); 
                } 
            }*/ 
    } 

5 Answers, 1 is accepted

Sort by
0
Doug Odegaard
Top achievements
Rank 2
answered on 22 Feb 2008, 12:21 AM
I'm also interested if anyone has found a way to drive the css or formatting from a data-driven level rather than solely from the css.  Having a way to tag a resource record with its corresponding css value would be awesome.
0
T. Tsonev
Telerik team
answered on 22 Feb 2008, 04:48 PM
Hi,

Peter, are you sure that there are associated resources with the appointment?

Doug, we avoid mixing the data with visual appearance whenever possible. Resources are generally considered as non-visual information, so we did not want to confuse the users by associating appearance data to them.

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Odegaard
Top achievements
Rank 2
answered on 22 Feb 2008, 05:23 PM
I am probably using resources like attributes.  The reason is that its simpler to get dropdown lists in an advanced form than with attributes unless you have a special sample of code that helps me get attributes.  Instead I'll do discovery on the resource and set css somehow with it in a manual fashion versus through the data source.  Thanks.
0
Peter
Telerik team
answered on 25 Feb 2008, 12:59 PM
Hi Doug,

I am not sure whether you have considered the approach from the topic on how to Set different styles for appointments, and more specifically the second approach at the bottom. Is this what you need?


Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Odegaard
Top achievements
Rank 2
answered on 26 Feb 2008, 06:17 AM
I have implemented that in my code and will adjust it in order to be data driven as much as possible.  Thanks Peter.
Tags
Scheduler
Asked by
Nyceane
Top achievements
Rank 1
Answers by
Doug Odegaard
Top achievements
Rank 2
T. Tsonev
Telerik team
Peter
Telerik team
Share this question
or