Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
WebMonthView - unable to create appoinments
posted

Hi,

we are using the trial version of the your software to explore on the functionalities.

Our project requirement is to add the appoinment to the WebMonthView control and to display the appoinments while clicking on any particular day.

We refered your sample codes available at http://samples.infragistics.com/2009.2/WebFeatureBrowser/Default.aspx

and the following knowledgebase http://devcenter.infragistics.com/support/KnowledgeBaseArticle.aspx?ArticleID=8484

but we are unable to acheive it.

Following is my coding:

Appointment appointment = new Appointment(this.WebScheduleInfo1);

// Configure the Appointment with the information in the data source

appointment.Key = "key1";

appointment.Subject = "Subject1";

appointment.StartDateTime = System.DateTime.Today;

appointment.EndDateTime = System.DateTime.Today;

FetchActivitiesContext context;

// Add the Appointment to the Activities list in the context

((IList) context.Activities).Add(appointment);

 

We get the following error:

1. Cannot implicitly convert type 'System.DateTime' to 'Infragistics.WebUI.Shared.SmartDate'

2. Use of unassigned local variable 'context'

Also we would like have the source code for  "AppoinmentAdd.aspx" which you have used in the following.

this.WebScheduleInfo1.AppointmentFormPath = "../Forms/AppointmentAdd.aspx";


Your help is appreciated.

Thanks

Regards,

Subha

Parents
No Data
Reply
  • 17259
    Offline posted

    1. Use SmartDate instead of DateTime:

    Infragistics.WebUI.Shared.SmartDate.Today

    2. I'm don't now how to initialize the context. I add them directly:

    WebScheduleInfo1.Activities.Add(appointment)

Children