We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SfSchedule need to Bind to my DB

Hi ,
i have Few Query regarding Syncfuion Scheduler . 
 i am using syncfuion Scheduler in my app , i tried to bind my real data to the control so i used used your online documentation 1.2.2.2 Using Data Binding technique . There i am getting one exception regarding scheduler  . i would like to know how i can resolved that , i am using below code for that 
   protected async override void OnNavigatedTo(NavigationEventArgs e)
{
            scheduler.ScheduleType = ScheduleType.Month;
            List<AppointemenTabletdata> lstappointment = new List<AppointemenTabletdata>();
//this GetAppointment will give me real data 
            lstappointment = await GetAppointment();

            MappedAppointments = new ObservableCollection<AppointemenTabletdata>();
            for (int i = 0; i < lstappointment.Count; i++)
            {

                this.MappedAppointments.Add(new AppointemenTabletdata { Subject = lstappointment[i].Subject, StartTime = (lstappointment[i].StartTime), EndTime = (lstappointment[i].EndTime), Note = lstappointment[i].Note });
            };

            this.DataContext = this;
}
Note : this is i am using on Navigation but you have given in Constructor . 
Xaml code 
///
   <Schedule:SfSchedule x:Name="scheduler"  
                               ItemsSource="{Binding MappedAppointments}"
                 IntervalHeight="30" Background="WhiteSmoke" CurrentDateBackground="#63A028"  HeaderBackground="#FF25A0DA"   ScheduleType="Month" Margin="0,0,0,51" >
            <Schedule:SfSchedule.AppointmentMapping>

                <Schedule:ScheduleAppointmentMapping SubjectMapping="Subject" StartTimeMapping="StartTime"  EndTimeMapping="EndTime" NotesMapping="Note">

                </Schedule:ScheduleAppointmentMapping>

            </Schedule:SfSchedule.AppointmentMapping>
            
        </Schedule:SfSchedule>

Before that error it has binding the data Properly but now i am getting this exception 

System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.UI.Xaml.Schedule.ScheduleMonthAppointmentViewControl.ScheduleMonthAppointmentViewControl_Loaded(Object sender, RoutedEventArgs e)
in my App.g.i.cs page .
I have Attached the Exception Image .
2- > one more thing is that earlier i could able to bind the data but i dont know how to update into my db after clicking on save or how to delete the Appointment if i am clicking Delete Button of our Add Event Flyout. 

Can you guys provide me a sample app attached with Sqlite DB which will have Appointment fields so that i can understand how i can make use of your control , Thanks in advance . 



exception_512c8097.rar

4 Replies

JO Joy Oyiess Rex  K Syncfusion Team November 22, 2013 01:09 PM UTC

Hi Shiva,

Thanks for using Syncfusion products.


We are currently analyzing on this, we will let you know the detail in three business days (Nov 27, 2013).


Please let us know, if you have any concerns.

Regards,
Joy Oyiess Rex K



JO Joy Oyiess Rex  K Syncfusion Team November 27, 2013 01:45 PM UTC

Hi Shiva,

 

We appreciate your patience.

 

We are currently analysing on it in the sample level, we will update you the details in two business days (Nov 29, 2013). Sorry about any inconvenience caused.

 

Please let us know, if you have any concerns.

 

Regards,

Joy Oyiess Rex K



JO Joy Oyiess Rex  K Syncfusion Team November 29, 2013 05:58 PM UTC

Hi Shiva,

 

We appreciate your patience.

 

Query #1 : Regarding Null reference exception.

 

We are not able to reproduce the mentioned issue in our current version v11.3.0.32. You can download it from the following link.

 

http://www.syncfusion.com/support/forums/winrt/113596/Syncfusion-Essential-Studio-for-WinRT-(XAML)-v113032-(Service-Pack)-available-for-download

 

We have also attached a simple sample for the same. Please find the sample in the attachment. In the provided sample we have used the Mapping feature of Schedule to Map the data available in SQLlite.

 

Note: You have to build one target for each. Select Build|Configuration Manager and select x86, x64 or ARM from the Platform drop-down list. (So that we can avoid warnings from the SQLite reference).

 

For more information please refer the below URL

 

http://blogs.msdn.com/b/robertgreen/archive/2012/11/13/using-sqlite-in-windows-store-apps.aspx

 

If the provided solution doesn't meet your requirement, please revert us back with more information about the reproducing scenario, so we could analyse on it more and provide your possible solution.

 

Query #2: Events for Delete and Save Button.

 

Currently we don’t have any special events to listen the “Save” and “Delete” button click. But your requirement can be achieve by the custom editor support. For the please refer the below sample

 

Dashboard -> WinRT -> Schedule -> CustomizationDemo

 

In the above sample, we have listened the delete and save button click events.

 

Please let us know, if you need any further assistance.

 

Regards,

Joy Oyiess Rex K

 

 






MT Mayur Tendulkar December 3, 2013 11:21 AM UTC

Do you have any update on this? I've a collection and when I bind to Schedule control, I'm getting following error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.UI.Xaml.Schedule.ScheduleMonthAppointmentViewControl.ScheduleMonthAppointmentViewControl_Loaded(Object sender, RoutedEventArgs e)

Although, this error occurs when I switch to control. i.e. when it receives focus. Data is perfects and binds well.

Loader.
Live Chat Icon For mobile
Up arrow icon