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

Attribute of Resource missing

1 Answer 95 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kok Fong
Top achievements
Rank 1
Kok Fong asked on 02 Jul 2013, 11:23 AM
Hi,

I have an application which implemented RadScheduler with server side code and doesn't involves any web service or WCF. I'm now trying to include extra attribute to the Resource so that I can display extra info on the resource header.

The code of adding attribute looks like this:
resource.Attributes.Add("JobTitle", "Software engineer")
Then in the RadScheduler_ResourceHeaderCreated event, I try to read the attribute with the code below:
jobTitle = args.Container.Resource.Attributes("JobTitle")
Unfortunately the attributes of the resource is empty and I couldn't figure out why, is there a known limitation or issue pertaining to this? Please shed some light.



1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 04 Jul 2013, 03:07 PM
Hello,

Let's assume that you have resource in the RadScheduler control containing three values: "Alex", "Bob", "Charlie". An easy and convenient way of adding additional user to the resource collection from type "User" would be to use the RadScheduler DataBound server-side event handler as shown in the attached project.
//code behind
protected void RadScheduler1_DataBound(object sender, EventArgs e)
    {
        RadScheduler1.Resources.Add(new Resource("User", 1, "John"));
    }

Hope that this will be helpful.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Kok Fong
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or