(CalendarPanel) Problem with Month Button & refresh data

  1. #1

    (CalendarPanel) Problem with Month Button & refresh data

    Hello,

    I have a CalendarPanel with this EventStore:

    <EventStore ID="EventStore1" runat="server" OnRefreshData="EventStore1_RefreshData">
      <Proxy>
        <ext:PageProxy />
      </Proxy>
    </EventStore>
    and the basic controls of the CalendarPanel:

    Click image for larger version. 

Name:	month_button.jpg 
Views:	16 
Size:	8.7 KB 
ID:	13791

    'EventStore1_RefreshData' refreshs EventStore with the events between 'StartDate' and 'EndDate'. The 'EventStore1_RefreshData' works fine and it is executed with every buttons except 'Month' (Prev month button and Next month button works fine too and refesh data, but no 'Month button' that only changes the view but with the old data of the last executed EventStore1_RefreshData, for example: You see the events of only one day in the month View if you was in the day view before).

    Whats the problem?
    thank you!
  2. #2
    Hi @carlos,

    Welcome to the Ext.NET forums!

    I have no idea. If you provide a test case, I could look at.
  3. #3
    Hi Daniil,

    If you debug the next code you can see that 'EventStore1_RefreshData' method is not called when you click the month button:

    CodeBehind:

            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    this.calendarPanel.EventStore.AddStandardFields();
                }
            }
    
            protected void EventStore1_RefreshData(object sender, StoreRefreshDataEventArgs e)
            {
    
            }
    and aspx:

    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
        <ext:ResourceManager ID="AppSecurityScriptManager" runat="server" AjaxMethodNamespace="AppSecurityAjaxMethods"
            IDMode="Explicit" />
        <ext:GroupStore runat="server" ID="GroupStore1">
            <Groups>
                <ext:Group CalendarId="1" Title="aDay" />
            </Groups>
        </ext:GroupStore>
        <ext:Panel ID="PanelCalendar" runat="server" Title="..." MinHeight="200" Cls="app-center"
            Layout="Fit">
            <Items>
                <ext:ColumnLayout ID="ColumnLayout1" runat="server" FitHeight="true">
                    <Columns>
                        <ext:LayoutColumn ColumnWidth=".9999">
                            <ext:CalendarPanel TodayText="Hoy" DayText="D?a" MonthText="Mes" WeekText="Semana"
                                runat="server" ID="calendarPanel" GroupStoreID="GroupStore1">
                                <EventStore ID="EventStore1" runat="server" OnRefreshData="EventStore1_RefreshData">
                                    <Proxy>
                                        <ext:PageProxy />
                                    </Proxy>
                                </EventStore>
                            </ext:CalendarPanel>
                        </ext:LayoutColumn>
                    </Columns>
                </ext:ColumnLayout>
            </Items>
        </ext:Panel>
    </asp:Content>
    Thank you!
    carlos
  4. #4
    I reproduced. I am not sure why it is not reloaded. You could reload it manually by this listener for a CalendarPanel.
    <ViewChange Handler="if (view.xtype === 'monthview') { view.reloadStore(); }" />

Similar Threads

  1. Replies: 1
    Last Post: Jul 21, 2014, 1:04 PM
  2. Replies: 1
    Last Post: Apr 04, 2014, 5:56 PM
  3. Replies: 6
    Last Post: Mar 28, 2013, 8:08 AM
  4. Replies: 1
    Last Post: Dec 01, 2010, 1:20 PM
  5. Replies: 1
    Last Post: Dec 01, 2010, 1:18 PM

Tags for this Thread

Posting Permissions