[CLOSED] Couple of issues detected on CalendarPanel on codebehind (V 1.2)

  1. #1

    [CLOSED] Couple of issues detected on CalendarPanel on codebehind (V 1.2)

    Hello again,

    I have detected a couple of problems creating a calendarpanel on codebehind.

    1- I have no equivalent to the monthview StartDay property on the weekview, So I cannot force the begining of the week in the weekview to use Monday instead of the default Sunday.
    2- Property DDResizeEventText does not exist in WeekView nor in DayView, so I cannot localize the text.

    SAmple code (Default.aspx)
    <%@ Page
        Language           = "C#"
        AutoEventWireup    = "true"
        Inherits           = "testcalendar.Default"
        ValidateRequest    = "false"
        EnableSessionState = "true"
    %>
    
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Calendar Test</title>
           
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
        </form>
    </body>
    </html>
    Default.aspx.cs
    using System;
    using System.Web.UI;
    using Ext.Net;
    
    namespace testcalendar {
        /// <summary>
        /// Description of MainForm.
        /// </summary>
        public class Default : Page {
    
            private void Page_Load(object sender, EventArgs e) {
    
    
                //Panel
                Panel pnl=new Panel();
                pnl.ID="MainPanel";
                pnl.Width=System.Web.UI.WebControls.Unit.Pixel(800);
                pnl.Height=System.Web.UI.WebControls.Unit.Pixel(400);
                pnl.Border=true;
                //fitlayout for the panel
                  FitLayout fly=new FitLayout();
                fly.ID="panelfitlayout";
                
                //Calendar
                CalendarPanel cp=new CalendarPanel();
                //cp.Region=Region.Center;
                cp.ID="CalendarPanel1";
                cp.MonthText="Mes";
                cp.WeekText="Semana";
                cp.DayText="Día";
                cp.TodayText="Hoy";
                        
                cp.ActiveIndex=1;
               
                //creating group store
                GroupStore grsto=new GroupStore();
                grsto.ID="GroupStore1";
                //creating first group
                Group grp=new Group();
                grp.CalendarId=1;
                grp.Title="group 1";
                grsto.Groups.Add(grp);
                
    
                //Month view parameters
                cp.MonthView=new MonthView();
                cp.MonthView.ShowHeader=true;
                cp.MonthView.ShowWeekLinks=true;
                cp.MonthView.ShowWeekNumbers=true;
                cp.MonthView.StartDay=1;
                cp.MonthView.TodayText="Hoy";
                cp.MonthView.DDMoveEventText="Mover actividad a {0}";
                cp.MonthView.DDCreateEventText="Crear actividad en {0}";
                cp.MonthView.DDResizeEventText="Actualizar actividad a {0}";
                
                //week view parameters
                cp.WeekView=new WeekView();
                cp.WeekView.TodayText="Hoy";
                cp.WeekView.DDMoveEventText="Mover actividad a {0}";
                cp.WeekView.DDCreateEventText="Crear actividad en {0}";
                //ERROR WeekView does not contain these properties!!
                //cp.WeekView.DDResizeEventText="Actualizar actividad a {0}";
                //cp.WeekView.StartDay=1;
    
               //Day View parameters
                cp.DayView=new DayView();
                cp.DayView.TodayText="Hoy";
                cp.DayView.DDMoveEventText="Mover actividad a {0}";
                cp.DayView.DDCreateEventText="Crear actividad en {0}";
                //ERROR DayView does not contain this property!!
                //cp.DayView.DDResizeEventText="Actualizar actividad a {0}";
                
                
                //Empty eventstore
                EventStore mainStore=new EventStore();
                
                
    //add one event
                Event myEvent = new Event();
                myEvent.Title = "titulo";
                myEvent.StartDate = DateTime.Now.AddDays(-1);
                myEvent.EndDate = DateTime.Now.AddDays(-1).AddHours(1);
                myEvent.IsNew=true;
                myEvent.EventId=11;
                myEvent.CalendarId=1;
                mainStore.Events.Add(myEvent);
                mainStore.DataBind();
              
                cp.EventStore=mainStore;
                //add calendar to fitlayout
                fly.Items.Add(cp);
                //add fitlayout to panel
                pnl.ContentControls.Add(fly);
    
                //add panel to form
                this.Form.Controls.Add(pnl);
    
            }
    
        }
    }
    Last edited by Daniil; Oct 10, 2011 at 12:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by jcanton View Post
    1- I have no equivalent to the monthview StartDay property on the weekview, So I cannot force the begining of the week in the weekview to use Monday instead of the default Sunday.
    Thanks for the report. We will consider to add it right now.

    For now I can suggest this solution:
    CalendarPanel1.WeekView.CustomConfig.Add(new ConfigItem("startDay", "1"));
    Quote Originally Posted by jcanton View Post
    2- Property DDResizeEventText does not exist in WeekView nor in DayView, so I cannot localize the text.
    Please keep one question/problem/issue per one thread. So, please start a new thread for this issue.
    Last edited by Daniil; Oct 05, 2011 at 12:47 PM.
  3. #3
    Thanks,

    I started a new thread with the second issue.

    The customconfig solution works fine.

    Just one think instead of CusStartDay, the property will be bettar Named as "StartDay" as it is how is it named in the MonthView and in the Configitem itself.

    Anyway thank you. The customconfig solution solves my problem.
  4. #4
    Sure, it will be named StartDay.

    Somehow I didn't remove that piece of code and "Cus" is a part of "CustomConfig".
  5. #5
    The future ticket has been created:
    https://extnet.lighthouseapp.com/pro...es/tickets/101

    .StartDay property has been added, revision #3730.

    Thanks for the request.
  6. #6

    TimeFormat question

    Quote Originally Posted by Daniil View Post
    The future ticket has been created:
    https://extnet.lighthouseapp.com/pro...es/tickets/101

    .StartDay property has been added, revision #3730.

    Thanks for the request.
    I am using EXT 2.1,
    <WeekView ID="WeekView1" runat="server" TodayText="<%$ Resources:Seagull,TAKVIM001 %>">
                                <CustomConfig>
                                    <ext:ConfigItem Name="startDay" Value="1" />
                                </CustomConfig>
                            </WeekView>
    I can't find StartDay property of WeekView but MonthView has it. CustomConfig is enough for now.
    What I want to ask is, I can't change the time format in WeekView and DayView. I am still searching for it.
    Last edited by Daniil; Nov 19, 2012 at 3:35 PM. Reason: Please use [CODE] tags
  7. #7
    Hi @stratek,

    Quote Originally Posted by stratek View Post
    I am using EXT 2.1,
    <WeekView ID="WeekView1" runat="server" TodayText="<%$ Resources:Seagull,TAKVIM001 %>">
                                <CustomConfig>
                                    <ext:ConfigItem Name="startDay" Value="1" />
                                </CustomConfig>
                            </WeekView>
    I can't find StartDay property of WeekView but MonthView has it. CustomConfig is enough for now.
    Thank you for the report. I added the property locally and will commit the change later this week.

    Quote Originally Posted by stratek View Post
    What I want to ask is, I can't change the time format in WeekView and DayView. I am still searching for it.
    If the issue is still actual, please start a new forum thread.
  8. #8

    timefield 24 hour problem

    Quote Originally Posted by Daniil View Post
    Hi @stratek,
    Thank you for the report. I added the property locally and will commit the change later this week.
    If the issue is still actual, please start a new forum thread.
    I find the solution of my timefield problem in another thread that you answered.
    Thank a lot :)
  9. #9
    Nice. Searching through the forums solves many problems.
  10. #10
    Quote Originally Posted by Daniil View Post
    Hi @stratek,

    Quote Originally Posted by stratek View Post
    I am using EXT 2.1,
    <WeekView ID="WeekView1" runat="server" TodayText="<%$ Resources:Seagull,TAKVIM001 %>">
                                <CustomConfig>
                                    <ext:ConfigItem Name="startDay" Value="1" />
                                </CustomConfig>
                            </WeekView>
    I can't find StartDay property of WeekView but MonthView has it. CustomConfig is enough for now.
    Thank you for the report. I added the property locally and will commit the change later this week.
    The fix has been committed to SVN. It will be included in the upcoming v2.1 release.

    Thanks again for the report.

Similar Threads

  1. [CLOSED] CalendarPanel Issues
    By cleve in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 05, 2012, 5:24 AM
  2. Replies: 8
    Last Post: Oct 21, 2011, 6:03 PM
  3. Couple Calendar Issues
    By reiben in forum 1.x Help
    Replies: 7
    Last Post: Nov 27, 2010, 3:25 PM
  4. [CLOSED] [1.0] Couple of v1.0 questions...
    By state in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 16, 2009, 4:08 PM
  5. [CLOSED] ImageCommandColumn couple bugs
    By pank in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 01, 2009, 5:48 AM

Posting Permissions