簡體   English   中英

我想覆蓋 AllowCreate,如何使用 Blazor 在 TelerikSchedule 中覆蓋此方法?

[英]I want to override on AllowCreate, How to override this method in TelerikSchedule with Blazor?

當 AllowCreate="true" 時,它會自動打開自己的約會 addDialog?。 我想要停止它並想要移動自定義頁面(我自己的頁面)。

我添加了關於 razor 的屏幕截圖在此處輸入圖像描述文件。 請看到並幫助我。 謝謝你!。

我為我的問題找到了如下解決方案。

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>

而且,我創建了在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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM