Remove entries in dropdown lists

2 posts, 1 answers
  1. David
    David avatar
    5 posts
    Member since:
    Aug 2015

    Posted 10 Nov 2015 Link to this post

    Hello Support Team,

    I implemented the scheduler in a mvc project with razor views.

    Whats the recommended way to remove entries from the dropdown lists on the editing form? For example: I'd like to remove the option "Yearly" in the "Repeat" dropdownlist and some options in the "repeat on" dropdownlist (day, weekday, weekend day). 

    Many thanks for your help.

    Regards,

    David

  2. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 11 Nov 2015 Link to this post

    Hello David,

    To achieve the desired behavior you should define custom editor template and adjust the options of the RecurrenceEditor:

    e.g.:
    @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
        .HtmlAttributes(new { data_bind = "value:recurrenceRule" }))
        .Frequency(frequency => frequency
            .Add(RecurrenceEditorFrequency.Never)
            .Add(RecurrenceEditorFrequency.Daily)
            .Add(RecurrenceEditorFrequency.Weekly)
        )
    )


    Regards,
    Vladimir Iliev
    Telerik
    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
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top