AHmedRef
AHmedRef

Reputation: 2611

Removing all events in 'ext:CalendarPanel'

Is there any possibility to remove all event items from an ext.net (C#) calendar ?

<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>

I tried this code, but with no result:

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

Upvotes: 2

Views: 206

Answers (1)

AHmedRef
AHmedRef

Reputation: 2611

solution Using JavaScript :

CompanyX.getStore().removeAll();

CompanyX is the namespace used :D

Using ASP.NET

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

Upvotes: 3

Related Questions