Pop up Resource OptionLabel

2 posts, 0 answers
  1. Liu
    Liu avatar
    1 posts
    Member since:
    Jun 2014

    Posted 16 Jun 2014 Link to this post

    Hi there,

    I have a scheduler that loads resource entries from a database.  When creating an appointment, these resources appears as a dropdownlist in the standard pop up screen.  However, the first entry in the dropdownlist is "None".  Is there a way to replace this with your own text eg "-- Select--" as I am not aware of any means to replace this optionlabel since resources are loaded from the database.

    Any help will be very much appreciated.

    Thanks,

    Li Yeo
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 19 Jun 2014 Link to this post

    Hi Liu,


    To be able to modify this message you should define custom editor template (demo here) for the scheduler and change the option in the dropDownList used for editing the resource:

    <div data-container-for="RoomID" class="k-edit-field">
        <input id="RoomID" name="RoomID" style="width: 200px" type="text"
            data-bind="value:RoomID"
            data-val="true"
            data-val-number="The field RoomID must be a number."
            data-source='[{"text":"Meeting Room 101","value":1},{"text":"Meeting Room 201","value":2}]'
            data-text-field="text"
            data-value-field="value"
            data-value-primitive="true"
            data-option-label="-- Select --"
            data-role="dropdownlist" />
    </div>

    Kind Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top