RadScheduler Resource Type Cascading Dropdown

14 posts, 0 answers
  1. Ayub
    Ayub avatar
    4 posts
    Member since:
    Apr 2009

    Posted 15 Apr 2009 Link to this post

    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.

     

     

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 15 Apr 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ayub
    Ayub avatar
    4 posts
    Member since:
    Apr 2009

    Posted 15 Apr 2009 Link to this post

    This solution is for Q3 2008. We are using Q2 2008. Need a solution example for Q2 2008
  5. Ayub
    Ayub avatar
    4 posts
    Member since:
    Apr 2009

    Posted 15 Apr 2009 Link to this post

    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
  6. Ayub
    Ayub avatar
    4 posts
    Member since:
    Apr 2009

    Posted 19 Apr 2009 Link to this post

    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.
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Apr 2009 Link to this post

    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.
  8. Gilberto Beltrao
    Gilberto Beltrao avatar
    7 posts
    Member since:
    Feb 2010

    Posted 06 Apr 2010 Link to this post

    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
  9. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 Apr 2010 Link to this post

    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.
  10. Kevin
    Kevin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2012 Link to this post

    I have the same issue as above.  Has there been a solution to the above thread? Please provide an example for me to follow.
  11. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 10 Aug 2012 Link to this post

    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.
  12. Kevin
    Kevin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 14 Aug 2012 Link to this post

    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

     


  13. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 15 Aug 2012 Link to this post

    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.
  14. Kevin
    Kevin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 23 Aug 2012 Link to this post

    Do you have tutorial on how to get advance form template working?  The demo is complicated.
  15. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 24 Aug 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017