@usingSyncfusion.EJ2.Blazor.Schedule @usingSyncfusion.EJ2.Blazor.DropDowns <EjsSchedule@ref="ScheduleObj"TValue="AppointmentData"Height="550px"SelectedDate="@(newDateTime(2019, 1, 31))"> <ScheduleQuickInfoTemplatesTemplateType="TemplateType.Cell"> <ContentTemplate> @if((contextasAppointmentData).ElementType =="cell") { <EjsDropDownListID="Subject"TValue="string"TItem="Title"Placeholder="Select a title"DataSource="@AppointmentTitle"CssClass="e-field"HtmlAttributes="@EventType"Value="@((contextasAppointmentData).Subject)"> <DropDownListEventsTValue="string"ValueChange="ChangeValue">DropDownListEvents> <DropDownListFieldSettingsValue="Text">DropDownListFieldSettings> EjsDropDownList> } ContentTemplate> ScheduleQuickInfoTemplates> <ScheduleEventSettingsDataSource="@DataSource">ScheduleEventSettings> EjsSchedule> @code{ EjsSchedule publicstringDropVal {get;set; } List newAppointmentData { Id = 1, Subject ="Meeting", StartTime =newDateTime(2019, 1, 31, 9, 30, 0) , EndTime =newDateTime(2019, 1, 31, 11, 0, 0), Description ="Discussion"} }; publicclassAppointmentData { publicintId {get;set; } publicstringSubject {get;set; } publicstringLocation {get;set; } publicDateTime StartTime {get;set; } publicDateTime EndTime {get;set; } publicstringDescription {get;set; } publicboolIsAllDay {get;set; } publicstringRecurrenceRule {get;set; } publicstringRecurrenceException {get;set; } publicNullable<int> RecurrenceID {get;set; } publicstringElementType {get;set; } } publicclassTitle { publicstringText {get;set; } } List newTitle() { Text="Meeting"}, newTitle() { Text="Conference"}, newTitle() { Text="Data Analyzing"}, newTitle() { Text="Not Available"} }; Dictionary<string,object> EventType =newDictionary<string,object>() { {"data-name","Subject"}, }; publicvoidChangeValue(ChangeEventArgs<string> args) { DropVal = args.Value; } } |
Find
the sample for to use a dropdown list instead of the textbox
in scheduler fromhere.