是否有可能从ext.net(C#)日历中删除所有事件项?

<ext:CalendarPanel ID="CalendarPanel1" runat="server" Region="Center">
  <CalendarStore ID="CalendarStore1" runat="server">
    <Calendars>
      <ext:CalendarModel CalendarId="1" Title="Home" />
    </Calendars>
  </CalendarStore>
  <MonthView runat="server" ShowHeader="true" ShowWeekLinks="true"
      ShowWeekNumbers="true" />
    <Listeners>
      <DayClick Fn="CompanyX.ShowDiagClickDay" Scope="CompanyX" />
    </Listeners>
  </MonthView>
</ext:CalendarPanel>


我尝试了这段代码,但没有结果:

this.CalendarPanel1.CalendarStore.RemoveAll();
this.CalendarPanel1.CalendarStore.Sync();

最佳答案

使用JavaScript解决方案:

CompanyX.getStore().removeAll();


CompanyX是使用的命名空间:D

使用ASP.NET

CalendarPanel1.CalendarStore.RemoveAll();
CalendarPanel1.Render();

10-07 22:00