[英]I want to override on AllowCreate, How to override this method in TelerikSchedule with Blazor?
When AllowCreate="true", its automatically opened own appointment addDialog?.当 AllowCreate="true" 时,它会自动打开自己的约会 addDialog?。 I want Stop that and want move custom page(My own page).我想要停止它并想要移动自定义页面(我自己的页面)。
I added screenshot about razor enter image description here file.我添加了关于 razor 的屏幕截图在此处输入图像描述文件。 Please see that and help me.请看到并帮助我。 Thank You!.谢谢你!。
I found a solution like below for my question.我为我的问题找到了如下解决方案。
Razor file code: Razor文件代码:
<TelerikScheduler
Data="@Appointments"
Date="@StartDate"
OnItemClick="@OnItemClick"
@bind-View="@CurrView"
DateChanged="@DateChangedHandler"
Height="480px">
<SchedulerResources>
<SchedulerResource Field="ManagerName" Data="@Managers" />
</SchedulerResources>
<SchedulerViews>
<SchedulerWeekView
StartTime="@DayStart"
EndTime="@DayEnd"
SlotDuration="30"
SlotDivisions="5"/>
</SchedulerViews>
</TelerikScheduler>
And also, I created method for automatically generate slot in cs file而且,我创建了在cs文件中自动生成槽的方法
private void SlotGenerated()
{
DateTime st = new DateTime(2022, 6, 1, 8, 0, 0);
DateTime ed = DateTime.Today.AddMonths(2);
int i = 1;
while (st <= ed)
{
if (i == 6) { i = 1; }
AppointmentDto appointment = new AppointmentDto();
appointment.Id = 0;
appointment.Start = st;
appointment.End = st.AddMinutes(6);
appointment.Name = "SLOT " + i;
appointment.IsAllDay = false;
appointment.ManagerName = "1";
Appointments.Add(appointment);
st = st.AddMinutes(6);
++i;`enter code here`
}
UIStateChanged();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.