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
70
Use of UltraDayView
posted

Hi,

 I am new to Infragistic calenders and scheduling.I am developing an application in C#.

I have the requirement to get a list of users and the jobs assigned to them from database.

and i need to show those jobs as appointment in Ultradayview depending upon the selected date from a date picker.

But the problem i am facing is Ultradayview is showing only the current date appointment.

When user selects a back date.how can i navigate to the back date to show the appointments??

Also when i click on a prticular appointment i  need to get the appointmnet ID  which i have set while creating an appointment and based on that it  opens another window to show the details.Which event gets fired when we click on a particular appointment & how can i get that ID from that appointment?

Can someone help me on this? 

 

Rickson

 

 

 

 

Parents
  • 69832
    Offline posted

    1) Use the UltraCalendarInfo.SelectedDateRanges collection:

    private void ShowDate( UltraDayView dayView, DateTime date )
    {
        try
        {
            dayView.BeginUpdate();
            dayView.CalendarInfo.SelectedDateRanges.Clear();
            dayView.CalendarInfo.SelectedDateRanges.Add( date );
        }
        finally
        {
            dayView.EndUpdate();
        }
    }


    2) When an Appointment is selected, the UltraCalendarInfo.BeforeSelectedAppointmentsChange event fires:


    this.dayView.CalendarInfo.BeforeSelectedAppointmentsChange += new BeforeSelectedAppointmentsChangeEventHandler(CalendarInfo_BeforeSelectedAppointmentsChange);

    void CalendarInfo_BeforeSelectedAppointmentsChange(object sender, BeforeSelectedAppointmentsEventArgs e)
    {
        Appointment appointment = e.NewSelectedAppointmentsCount > 0 ? e.NewSelectedAppointmentsCount[0] : null;

        if ( appointment != null )
        {
            DataRowView drv = appointment.BindingListObject as DataRowView;

            //  TODO: Get the ID (?)
        }
    }

Reply Children
No Data