Welcome to Mediachase Community Sign in | Join | Help    
in Search   

Day View Problem

Last post Wed, Apr 02 2008, 1:24 AM by ga. 7 replies.
Sort Posts: Previous Next
  •  Tue, Mar 25 2008, 8:00 AM 7995

    Day View Problem

    i had a problem with dayview ,that in case as example i had and even that has start Date and end Date with time ,in case that event start on " 23-3-2008 3:00 am" and end on " 25-3-2008 5:00 am"

    it appears on the dayes 23-24-25 but with template all day ,i need to be display according to timing in the start and end date i mean in day 23-3-2008 the item appear to time 3:00 am to the end of day,and in the day 25 -3-2008 appear from the begin of day to 5 :am

    in your samples http://demo.mediachase.com/calendar.net/DataBinding/sample2.aspx  choose any item that has range many days and navigate to the day of its stared date you will find the descrption with all day item not to the current hour

    So how can this done???

  •  Wed, Mar 26 2008, 12:58 AM 7997 in reply to 7995

    Re: Day View Problem

    Hi,
    all events with duration more than one day (or with property IsAllDay=true) are displayed using all day template only (in event bar). In Microsoft Outlook Calendar and Google Calendar long and all day events are displayed in the same way.
  •  Wed, Mar 26 2008, 1:55 AM 7998 in reply to 7997

    Re: Day View Problem

    Attachment: dayview.JPG

    in outlook Calender in case the event is not  isallday, may be it appear in template all day but with correct timeing(there is a clock indicate the time) in the first day,and there is blue bar indicate the beginning of timing ,attached pictures show that and on the day range between them the blue bar indicate full day

    So that is mean shall we change the template of allday at run time or what ??as in case i need to display the event name and the start timeing in the first day,in other day just need to displayed the name,in last day want to show the event name with end timing

    how can this is done?and what about the blue bar that appear???

     


  •  Thu, Mar 27 2008, 2:14 AM 8008 in reply to 7998

    Re: Day View Problem

    Hi,
    you can display event name and start time in the first day and event name and end time in the last day. Try to use the following all day template:

    <AllDayItemTemplate>
    <span style='<%#(((DateTime)Eval("StartDate")).Date == CalendarCtrl.SelectedDate.Date && ((DateTime)Eval("StartDate")).Date!=((DateTime)Eval("FinishDate")).Date) ? "display:block" : "display:none"%>'>start</span>
    <%# DataBinder.Eval(Container, "Label") %>
    <
    span style='<%#(((DateTime)Eval("FinishDate")).Date == CalendarCtrl.SelectedDate.Date && ((DateTime)Eval("StartDate")).Date!=((DateTime)Eval("FinishDate")).Date) ? "display:block" : "display:none"%>'>finish</span>
    </AllDayItemTemplate>

    Just replace words "start" and "finish" in the spans with your indicators of start and finish time.

    The blue bar will not appear anyway.

  •  Sun, Mar 30 2008, 5:53 PM 8029 in reply to 8008

    Re: Day View Problem

    when i try to put th,in  code in the application it give me this error:-

    Compiler Error Message: CS0103: The name 'Eval' does not exist in the class or namespace 'ASP.Sample1_aspx'

    and there is another point,in your replay you said that the event with property isallday = true ,the calnder render it in template of allday,So from where i can deal with this proberty through the calnder control, what i know it take a data source that contain startdate and enddate and then show the items depend on them,So what is the proberty which indicate if that item isallday or not ??

    and if i make this property =false and events duration more than one day will appear too in the template allday??

     

  •  Mon, Mar 31 2008, 1:28 AM 8031 in reply to 8029

    Re: Day View Problem

    Hi,
    you should paste AllDayItemTemplate code into calendar control tag.

    <mc:calendar id="CalendarCtrl" runat="server" ViewType="WorkWeekView"  >
    ...
    <AllDayItemTemplate>
    ...
    </AllDayItemTemplate>
    ...

    </mc:calendar>

    Each calendar item has public boolean property "IsAllDay".  If item IsAllDay=true it will be displayed in the event bar (region over main grid with time scale). If item StartDate.Date != item EndDate.Date it will be also displayed in the event bar (using AllDayItemTemplate).

  •  Mon, Mar 31 2008, 7:10 AM 8038 in reply to 8031

    Re: Day View Problem

    Really I am appreciating your quick replay but I still have the same problem when I write what you told me in the place you mention, and attached the Sample2.aspx page that in your sample with your modification, if you try to run it will give the same compilation error.

     

    And about the property isallday  ,as in that page ,the calendar take its item at runtime, that mean we don’t define a  CalendarItem, So how can we set the proberty isallday?? As in you project you set it in something like that  :-

    <mc:CalendarItem StartDate="08/17/2003 13:29:00" LabelColor="White" Label="Some label" RenderingStyle="Auto"

                                                                                              EndDate="08/21/2003 14:10:00" EventBarFilledColor="Blue" IsAllDay="True" EventBarEmptyColor="White"></mc:CalendarItem>

     

    But the real application will bind the calendar at the runtime so it will not  contain a defention for <mc:CalendarItem>??

     

    And in case you mention,that mean the calendar data source should contain two items start time and end time?? cannot the calendar take there values from start date and end date(i mean in my case that an item its range more than one day)

     

    And the blue Bar that appear on the outlook ,in case i want to make it appear too in the application how can this done.

     

    waiting for your replay,and thank in advance

     

     

  •  Wed, Apr 02 2008, 1:24 AM 8051 in reply to 8038

    Re: Day View Problem

    Hi,
    make empty sample2.aspx page. Insert all code from working sample page to sample2 page. Replace "AllDayItemTemplate" in calendar control tag inside sample2 with one that was provided in previous posts.

    mc:CalendarItem tags are supported in design view mainly for debugging. In real applications databinding is used. Calendar control supports databinding as any other asp.net databound control. Your data source must contain two required fields for StartDate and EndDate of item. If you use databinding you have to set properties "DataStartDateField" and "DataEndDateField" of the calendar control. For more information please read "Data Binding" section in documentation (which should be installed with Calendar.NET control).
    You can run through calendar items collection and get or set IsAllDay property of each item:
    foreach (CalendarItem it in CalendarCtrl.Items)
    {
       ...
       it.IsAllDay = ...
       ...

    }

     

    Calendar control does not render the blue bar for all day items as it is rendered in Outlook.

View as RSS news feed in XML
Site Terms | Privacy Policy | About Us | Contact Us
Running on Mediachase eCommerce Framework 4.0.
  Copyright © Mediachase, LTD. 1997-2006. All Rights Reserved

E-commerce, HelpDesk, Service Desk & Project Management Software, alternatives to Microsoft Project Server & Sharepoint Collaboration Server
project management software | microsoft project server | sharepoint collaboration server | issues management, helpdesk & service desk
Powered by Community Server, by Telligent Systems