This is a migrated thread and some comments may be shown as answers.

Pop up Resource OptionLabel

1 Answer 54 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Liu
Top achievements
Rank 1
Liu asked on 17 Jun 2014, 02:11 AM
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

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 19 Jun 2014, 06:19 AM
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!
 
Tags
Scheduler
Asked by
Liu
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or