是否有可能从 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();
答案 0 :(得分:3)
解决方案使用JavaScript:
CompanyX.getStore().removeAll();
CompanyX是使用的命名空间:D
使用ASP.NET
CalendarPanel1.CalendarStore.RemoveAll();
CalendarPanel1.Render();