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

RadScheduler Resource Type Cascading Dropdown

13 Answers 381 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ayub
Top achievements
Rank 1
Ayub asked on 15 Apr 2009, 05:54 AM

How do you create cascading Dropdown for Resource Type. We have two resources added to appoint. Class and teacher. We want during time of creation of appointment. When user selects class. The teacher drop down should filter the data and show only teacher for that class. We are using Linqdatasource

question 1: For teacher Linqsource how can we pass parameter as class dropdown control value.
question 2: How can we define on selected index change event for dropdown class.
question 3: How can you make teacher dropdown invisible as default. and make it visible on selected index change event of Class dropdown.

 

 

13 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 Apr 2009, 11:31 AM
Hello Ayub,

The following kb article will help you get started:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-dropdownlist-controls-in-the-advanced-form.aspx


All the best,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ayub
Top achievements
Rank 1
answered on 15 Apr 2009, 05:08 PM
This solution is for Q3 2008. We are using Q2 2008. Need a solution example for Q2 2008
0
Ayub
Top achievements
Rank 1
answered on 16 Apr 2009, 03:26 AM
We are trying to use the advance form example in Q2 Live demo folder scheduler example. We copied DefaultTemplates but we are getting all sort of error related to telerik.Quick start and already defined attributes error. Do you have any working Q2 2008 advance form example
0
Ayub
Top achievements
Rank 1
answered on 19 Apr 2009, 07:33 AM
Ok the example link given above. After lot of struggle we were able to make the Code work. We are using two dropdowns in Custome Attributes as shown in example. But the Selected index change is not working. On selected index change the form is posted back and all the data is lost.

Can you provide working selected index change event for given example.

Secondly in all the examples for User and room the data source is XML file. Do we have any User and Room example which uses Linq as datasource.
0
Peter
Telerik team
answered on 20 Apr 2009, 08:07 AM
Hello Ayub,

I am not sure why you experience this problem at your end. If you can send us a workig project demonstrating the issue, we will be able to tell what the problem is. To be able to attach files, you need to open a support ticket.

As for the other question, here is a LINQ data source online demo with RadScheduler:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/linqdatasource/defaultcs.aspx

Also, there is a kb article with LINQ:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/radscheduler-with-linqdatasource.aspx


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Gilberto Beltrao
Top achievements
Rank 1
answered on 06 Apr 2010, 09:26 PM
Peter,

The link you posted (http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-dropdownlist-controls-in-the-advanced-form.aspx) is dead.

Do you have and example that could help me to apply styles dynamically to a Scheduler event? I wrote the following code but the scheduler just ignores it and the style isn't applied:

@Page_PreRender:

...
        Scheduler1.DataSource = userEvents;
        Scheduler1.DataBind();

        foreach (var eventTypes in events.sp_Select_EventTypesByOrgID(orgId)) 
        {  
            string color = eventTypes.Color;  
            string absencetype = eventTypes.AbsenceType;  
 
            RadScheduler1.Resources.Add(new Resource("EventType", eventTypes.EventTypeID, eventTypes.EventType.Trim()));  
            RadScheduler1.ResourceStyles.Add(new ResourceStyleMapping("Calendar", eventtype, "rsCategory" + color.Trim()));  
 
        } 

I have a column named Color and it is being correctely populated so it is matching Telerik's (16) styles. I even tried applying styles during the Databound but it didn't work as well:

@RadScheduler1_AppointmentDataBound:

 

        if (e.Appointment.Resources.GetResourceByType("Calendar") != null )  
        {  
            string eventType = e.Appointment.Resources[0].Text.Trim();  
            if (eventType != null)  
            {  
                switch (eventType)  
                {  
                    case "Meeting":  
                        e.Appointment.CssClass = "rsCategoryOrange";  
                        break;  
                    /// more here  
                    default:  
                        e.Appointment.CssClass = "rsCategoryBlue";  
                        break;  
                }  
            } 
I noticed that (e.Appointment.Resources.GetResourceByType("Calendar"is always null.

It works thou if I hardcode the styles to the HTML but it crashes if my Org passes an event not coded there.

Maybe I'm applying the styles at a wrong place... any clue?

Thanks!
Gilberto
0
Peter
Telerik team
answered on 08 Apr 2010, 03:54 PM
Hello Gilberto,

The kb article you refer to has been updated and its url has changed (aplogies for this). Here is the correct url in case you need it for reference:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx

As for the other issue, I am not sure why you need to handle Page_PreRender, but this event might be too late for the styles to be applied and to declare resources. Can you move your logic in Page_Init or  Page_Load instead.

Alternatively, you can declare resource style mapping inline as in this demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx

<ResourceStyles>
             <telerik:ResourceStyleMapping Type="User" Text="Alex" ApplyCssClass="rsCategoryBlue" />
             <telerik:ResourceStyleMapping Type="User" Text="Bob" ApplyCssClass="rsCategoryOrange" />
             <telerik:ResourceStyleMapping Type="User" Text="Charlie" ApplyCssClass="rsCategoryGreen" />
         </ResourceStyles>



All the best,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kevin
Top achievements
Rank 1
answered on 09 Aug 2012, 06:18 PM
I have the same issue as above.  Has there been a solution to the above thread? Please provide an example for me to follow.
0
Helen
Telerik team
answered on 10 Aug 2012, 03:57 PM
Hi Kevin,

What is the exact problem that you experience?
Do you want to apply styles dynamically to RadScheduler or something different?

Kind regards,
Helen
the Telerik team
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 their blog feed now.
0
Kevin
Top achievements
Rank 1
answered on 14 Aug 2012, 11:56 PM
I created dropdowns using resource type in the Radscheduler.  This is the event I want to happen.  When selecting from the first dropdown, the value which I selected determines what will be populated on the second dropdown.  When selecting from the second dropdown, the value selected will determine the populating of the third dropdown and so on.  I guess they call that Radscheduler resource type cascading dropdown.  Can I accomplish this?  I don't see any of your demo for the radscheduler that has this feature.  What I see is single data source dropdown, no cascading.
This is what I did and can't cascade.

 

 

ResourceTypes

 

 

 

telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="Programs"

 

 

 

KeyField="Description" Name="ProgramType" TextField="Description"

 

 

 

telerik:ResourceType DataSourceID="SqlDataSource1" ForeignKeyField="Users"

 

 

 

KeyField="Full_Name" Name="All_Users" TextField="Full_Name"

 

 

 

telerik:ResourceType DataSourceID="SqlDataSource3" ForeignKeyField="ROOMS"

 

 

 

KeyField="ROOMNAME" Name="NameOfRoom" TextField="ROOMNAME"

 

 

 

ResourceTypes

 


0
Peter
Telerik team
answered on 15 Aug 2012, 10:15 AM
Hi Kevin,

Have you tried the approach used in this kb article -
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx?

Note that you need to use custom attributes instead of resources to achieve the related comboboxes functionality.


Greetings, Peter
the Telerik team
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 their blog feed now.
0
Kevin
Top achievements
Rank 1
answered on 23 Aug 2012, 10:44 PM
Do you have tutorial on how to get advance form template working?  The demo is complicated.
0
Peter
Telerik team
answered on 24 Aug 2012, 02:11 PM
Hello Kevin,

There is a tutorial in the help -
http://www.telerik.com/help/aspnet-ajax/scheduler-customzing-advanced-form-advanced-templates.html


Regards,
Peter
the Telerik team
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 their blog feed now.
Tags
Scheduler
Asked by
Ayub
Top achievements
Rank 1
Answers by
Peter
Telerik team
Ayub
Top achievements
Rank 1
Gilberto Beltrao
Top achievements
Rank 1
Kevin
Top achievements
Rank 1
Helen
Telerik team
Share this question
or