Cascading dropdownlist on layout page

2 posts, 0 answers
  1. Shital
    Shital avatar
    7 posts
    Member since:
    Jan 2016

    Posted 19 Feb 2016 Link to this post

    I have two dropdown at layout screen which can be use by more than one view.

    My first view contain layout screen(with cascading dropdown) and scheduler control.

    1.On Page load ,both cascading dropdown should populate with default value with scheduler calendar.

    2.Scheduler control should load based on cascading dropdown selection change.

    Issue#1 : My second dropdown is not loading and it is disable.

    issue#2 : Scheduler control loading before layout dropdowns call. 

    Layout view :

                  .HtmlAttributes(new { style = "width:100%" })
                  .DataSource(source =>
                      source.Read(read =>
                          read.Action("GetFacilityList", "Facility");

    cascading dropdown:

                  .HtmlAttributes(new { style = "width:100%" })
                          .DataSource(source =>
                      source.Read(read =>
                          read.Action("GetFacilityLocationsList", "Facility")
                                        function filterLocations() {
                                            return {
                                                facilityId: $("#Facility").val()


    Sceduler partial view:
                      .StartTime(6, 00, 00)
                      .EndTime(23, 00, 00)
              .Views(views =>
                  views.WeekView(weekView => weekView.Selected(true));

                      .Editable(editable =>
              .Group(group => group.Resources("Rooms"))
              .Resources(resource =>
                  resource.Add(m => m.Room.RoomId)
                  .DataSource(d => d.Read("DisplayBlocks", "Schedule"))


  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 24 Feb 2016 Link to this post

    Hello Shital,

    Straight up to your questions:

    #1: If the second widget is disabled, then it is not cascading from the first one or the parent does not have any value. Note that parent widget should on the page when child is added, otherwise the cascading functionality will not work.

    Examine our online demo for more details. You can use it as a reference implementation.

    #2: You can prevent initial loading of the Scheduler setting its AutoBind option to false: Once the dropdownlists are bound (you can use dataBound event to determine that) you can filter the scheduler. You need to be familiar with DataSource API to be able to do that:
    Georgi Krustev
    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 Feedback Portal and vote to affect the priority of the items
Back to Top