How to refresh CalendarPanel ???

  1. #1

    How to refresh CalendarPanel ???

    Hi .

    Dears , I have CalendarPanel that fill from changed Combo in page , in code fetch 3 records and added in EventStore and run EventStore.DataBind() , but my Events Not show in CalendarPanel , how to refresh CalendarPanel that show these Events ???

                            foreach (Events event in EventsList)
                                Ext.Net.Event myEvent = new Ext.Net.Event();
                                myEvent.EventId = event.Id;
                                myEvent.Title = event.ReturnText;
                                myEvent.StartDate = event.FromDateTime;
                                myEvent.EndDate = event.ToDateTime;
                                myEvent.CalendarId = 1;
                                myEvent.IsAllDay = false;
  2. #2

    I had a look on your code, seems it looks fine.

    Could you provide a full (but simplified) sample to reproduce?
  3. #3
    Recently we have added a fix in SVN regarding to EventStore.DataBind() during DirectEvent. I'm pretty sure the issue is related with this fix.

    The fix will be available in a next release. It will come soon (RC2)..
  4. #4
    Hi .
    tanks for ur reply , what do i do now until will come RC2 ???????
  5. #5
    To ensure please provide a full sample. I will test your code with the latest dlls.
  6. #6

    <script runat="server">
        protected void Page_Init(object sender, EventArgs e)
            this.CalendarPanel1.EventStore = new EventStore { ID = "EventStore1" };
        protected void ItemSelected(object sender, EventArgs e)
            List<Ext.Net.Event> events = new List<Ext.Net.Event>();
            Ext.Net.Event myEvent = new Ext.Net.Event();
            myEvent.EventId = 1;
            myEvent.Title = "Test";
            myEvent.StartDate = DateTime.Parse("2010/11/30 12:30");
            myEvent.EndDate = DateTime.Parse("2010/11/30 15:30");
            myEvent.CalendarId = 1;
            myEvent.IsAllDay = false;
            Ext.Net.Event myEvent1 = new Ext.Net.Event();
            myEvent1.EventId = 2;
            myEvent1.Title = "Test2";
            myEvent1.StartDate = DateTime.Parse("2010/11/30 08:30");
            myEvent1.EndDate = DateTime.Parse("2010/11/30 10:30");
            myEvent1.CalendarId = 1;
            myEvent1.IsAllDay = false;
       <ext:ResourceManager ID="ResourceManager" runat="server" />
            <ext:Viewport ID="Viewport1" runat="server" Layout="Border">
                    <ext:BorderLayout ID="BorderLayout1" runat="server">
                            <ext:Panel ID="Panel1" runat="server" Cls="ContainerPanel" Height="120">
                                            <td align="left">
                                                <asp:Label ID="Label2" runat="server" Text="Displayer" Width="150"></asp:Label>
                                                <ext:ComboBox ID="ComboDisplayer" runat="server" TypeAhead="true" Mode="Local" ForceSelection="true"
                                                    TriggerAction="All" EmptyText="Loading..." ValueNotFoundText="Loading...">
                                                        <ext:ListItem Text="TV1" Value="1" />
                                                        <ext:ListItem Text="TV2" Value="2" />
                                                        <ext:ListItem Text="TV3" Value="3" />
                                                        <ext:ListItem Text="TV4" Value="4" />
                                                        <Select OnEvent="ItemSelected" />
                            <ext:Panel ID="Panel5" runat="server" Cls="ContainerPanel">
                                    <ext:FitLayout ID="FitLayout1" runat="server">
                                            <ext:Panel ID="Panel3" runat="server" Title="..." Layout="Border" Region="Center"
                                                    <ext:Panel ID="Panel4" runat="server" Width="176" Region="West" Border="false" Cls="app-west">
                                                            <ext:DatePicker ID="DatePicker1" runat="server" Cls="ext-cal-nav-picker">
                                                                    <Select Handler="{DatePicker1}.getValue());" />
                                                    <ext:CalendarPanel ID="CalendarPanel1" runat="server" Region="Center" Border="false">
                                                        <GroupStore ID="GroupStore1" runat="server">
                                                                <ext:Group CalendarId="1" Title="Home" />
                                                        <MonthView ID="MonthView1" runat="server" ShowHeader="true" ShowWeekLinks="true"
                                                            ShowWeekNumbers="true" />
            <ext:EventEditWindow ID="EventEditWindow1" runat="server" Hidden="true" GroupStoreID="GroupStore1">
  7. #7
    Yes, your code works fine with the latest dlls.

    For now, before next release, you could add these events via JavaScript.

    By the way we recommend to use JavaScript anywhere where possible.
  8. #8
    very very tanks dear

Similar Threads

  1. [CLOSED] Calendarpanel refresh issue + objectdatasource
    By bossun in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 09, 2012, 2:30 PM
  2. calendarpanel + objectdatasource
    By bossun in forum 1.x Help
    Replies: 3
    Last Post: Aug 08, 2012, 6:07 AM
  3. Replies: 2
    Last Post: Jan 22, 2012, 2:00 PM
  4. [CLOSED] [1.0] CalendarPanel
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 15, 2011, 11:40 AM
  5. Replies: 2
    Last Post: Jul 30, 2010, 12:37 AM

Posting Permissions