3 Answers, 1 is accepted
Hello Oad,
The 'none' option is set as option label for the DropDownList in order to have the event model a default value for the resourceId field (when create a new event).
My suggestion in this case would be using the custom editor template. The editor template of the Scheduler can be defined manually using the template option. Here is a code library which shows how to define a custom editor template.
Regards,
Boyan Dimitrov
Telerik
Ok. Sounds fair.
Have you got any examples that use plain JS or perhaps PHP? I'm having a bit of a problem translating the template to something I can use.
I also noticed when I tried to make my own multiselect, that I couldn't set the initial values. Do I need to do anything special to have the values from the model preselected in the template?
Thanks
Hello Oad,
The code library that I sent you in my last response shows how to define Kendo UI Scheduler (JavaScript) with custom editor template. No MVC wrappers are used in the project.
Also in the example a Kendo UI MultiSelect widget is used in order to select attendees for the current event. The widget's value is bound to Attendees model field. It preselects the selected Attendees for the event and also and change the model field by using:
<select id="Attendees" multiple="multiple" name="Attendees" data-role="multiselect" data-bind="value:Attendees" data-source='[{"text":"Alex","value":1},{"text":"Bob","value":2},{"text":"Charlie","value":3}]' data-text-field="text" data-value-field="value" data-value-primitive="true" ></select>Boyan Dimitrov
Telerik