How to apply theme for the Schelduler

5 posts, 1 answers
  1. Shimon
    Shimon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 14 Mar 2014 Link to this post

    Hello

    I have some trouble to apply a theme for the schelduler.
    I want to apply the "Moonlight" theme  for the "Schelduler selection" that can be currently selected in the Kendo webpage Demos.
    I choose the theme but the code of the Kendo UI web page doesn't change.

    Cf : http://demos.telerik.com/kendo-ui/web/scheduler/selection.html

    I use Kendo UI 2013.3.1511 and Razor engine.

    Here is my code :
    @(Html.Kendo().Scheduler<iMail.Web.Models.TaskViewModel>()
                        .Name("scheduler")
                        .Date(DateTime.Now)
                        .StartTime(new DateTime(2013, 6, 13, 7, 00, 00))
                        .Height(600)
                        .Views(views =>
                        {
                            views.DayView();
                            views.WeekView();
                            views.MonthView();
                            views.AgendaView(agenda => agenda.Selected(true));
                        })
                        .Selectable(true)
                        .Timezone("Etc/UTC")
                        .Editable(editable => {
                            editable.TemplateName("_EditorTemplatePartial");
                        })
                        .DataSource(d => d
                                .Model(m => {
                                      
                                    m.Id(f => f.TaskID);
                                    m.Field(f => f.Title).DefaultValue("No title");
                                    m.RecurrenceId(f => f.RecurrenceID);
                                })
                            .Events(e => e.Error("error_handler"))
                            .Read("TasksRead", "Dashboard")
                            .Create("Tasks_Create", "Dashboard")
                            .Destroy("Tasks_Destroy", "Dashboard")
                            .Update("Tasks_Update", "Dashboard")
                        )
                    )


  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 14 Mar 2014 Link to this post

    Hi Shimon,

    The theme of the widget is determined by the kendo styles included on the page. If you want to use the moonlight theme you will need to include the kendo.common.min.css as well as kendo.moonlight.min.css. More information on how to setup the ASP.NET MVC application with UI for ASP.NET  MVC can be found in our documentation. (MVC3, MVC4, MVC5)

    Regards,
    Rosen
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Shimon
    Shimon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 14 Mar 2014 Link to this post

    Hello
    Thank a lot for your answer but the page of my website which contains the schelduler are now using the moonlight theme.
    The only thing i want is to set the moonlight theme only on the Schelduler.

    I set my code for the schelduler in a separated file "ScheldulerPartial.cshtml" that i call like that : @Html.Partial("ScheldulerPartial")
    I create a bundle like this :
    bundles.Add(new StyleBundle("~/bundles/moonlight").Include(
                    "~/Content/Kendo/2013.3.1511/kendo.common.css",
                    "~/Content/Kendo/2013.3.1511/kendo.moonlight.css"));
    And in my ScheldulerPartial.cshtml i use the style
                    @Styles.Render("~/bundles/moonlight")

    I don't know how to deal with it.
  5. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 14 Mar 2014 Link to this post

    Hello Shimon,

    I'm afraid that setting theme for individual widget is not supported by default. However, you may refer to this forum thread, which discuss possible workaround.

    Regards,
    Rosen
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  6. Shimon
    Shimon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 17 Mar 2014 Link to this post

    Thank you very much
Back to Top
UI for ASP.NET MVC is VS 2017 Ready