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

Binding custom datatype in SfSchedule - Month view

Hello,

I am trying to use a collection of a custom data type "AppointmentViewModel" to bind to the item source of the SfSchedule control. For the most part, I've been able to get this working - items are being displayed at the appropriate location for the different ScheduleTypes (Month, Week, etc.). But I've found a problem while doing template data binding in the Month view.

I want to bind to certain properties of my AppointmentViewModel to affect how the appointment is displayed on the calendar, and I've created a custom DataTemplate for the SfSchedule.AppointmentTemplate property. This works, except when ScheduleType is set to Month. When looking at the Month, only one appointment appears to bind correctly. Any others are drawn in the correct position, but their DataTemplate fails to bind.

I investigated further, and found that the reason this is happening is because the DataContext of the DataTemplate is not getting set correctly in the Month view, except for the first AppointmentViewModel. I added an event handler for DataContextChanged in my DataTemplate, and I can see by debugging when this event fires that the DataContext is never set to an instance of AppointmentViewModel, except for the first item. It is being set instead to an instance of "Syncfusion.UI.Xaml.Schedule.ScheduleAppointment".

The  debugging output window also displays a binding error message that also confirms this problem:
Error: BindingExpression path error: 'CustomProperty' property not found on 'Syncfusion.UI.Xaml.Schedule.ScheduleAppointment'. BindingExpression: Path='CustomProperty' DataItem='Syncfusion.UI.Xaml.Schedule.ScheduleAppointment'; target element is 'Windows.UI.Xaml.Controls.TextBlock' (Name='null'); target property is 'Text' (type 'String')

Please advise on how to resolve this. Thanks!

17 Replies

JO Joy Oyiess Rex  K Syncfusion Team March 13, 2014 06:52 AM UTC

Hi Timothy,

 

Thanks for your interest in Syncfusion products.

 

We have already noted the mentioned issue and we have fixed it. The fix for this issue will be included in our upcoming volume release (Vol 1 Mar , 2014), which is estimated to be available by the end of this month.

 

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

 

Regards,

Joy Oyiess Rex K



TJ Timothy J Eicher March 13, 2014 03:24 PM UTC

That's great news, thank you!

I also have a question about custom styling. I'd like to override the default template of the SfSchedule control so I can make the header match the style of my app more closely. I found that setting a template for the HeaderTitleBar was not enough, because I would like to change the location of the left/right arrows which are located in the main template. However, I can't seem to use the template which is included in the generic.xaml file, because it tries to set and use internal properties: 
HeaderTitleBarView.CurrentScheduleType 
HeaderTitleBarView.SelectedDates
which want to be bound to other internal properties:
SfSchedule.PrevSelectedDates
SfSchedule.CurrentSelectedDates

Is there any possibility that these will be changed to public in the March release? Or is there another way to set the main template?

I can move this question to a new thread if that will be helpful.

Thanks!


KZ Kesem Zur-Korakin March 13, 2014 06:22 PM UTC

Hi,

I'm encountering the same issue...

Is the new version out already ? How can I install it ?

Thanks,

Kesem



JO Joy Oyiess Rex  K Syncfusion Team March 14, 2014 04:36 AM UTC

Hi Kesem,

 

Thanks for your interest Syncfusion products.

 

As mentioned in our previous update, the fix for this issue will be included in our upcoming volume release (Vol 1 Mar , 2014), which is estimated to be available by the end of this month.

 

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

 

Regards,

Joy Oyiess Rex K



JO Joy Oyiess Rex  K Syncfusion Team replied to Timothy J Eicher March 14, 2014 10:36 AM UTC

That's great news, thank you!

I also have a question about custom styling. I'd like to override the default template of the SfSchedule control so I can make the header match the style of my app more closely. I found that setting a template for the HeaderTitleBar was not enough, because I would like to change the location of the left/right arrows which are located in the main template. However, I can't seem to use the template which is included in the generic.xaml file, because it tries to set and use internal properties: 
HeaderTitleBarView.CurrentScheduleType 
HeaderTitleBarView.SelectedDates
which want to be bound to other internal properties:
SfSchedule.PrevSelectedDates
SfSchedule.CurrentSelectedDates

Is there any possibility that these will be changed to public in the March release? Or is there another way to set the main template?

I can move this question to a new thread if that will be helpful.

Thanks!

Hi Timothy,

 

Thanks for you previous update.

 

We have analysed your requirement. Based on the implementation of SfSchedule control, we aren’t considered to expose those APIs publicly. Instead your requirement can be achieved by collapsing the default navigation buttons (left and right arrow) from the Schedule and customizing   the default template for  HeaderTitleBarView.

We are currently working on it in the sample level, we will update you the sample in two business days(Mar 18, 2014).

 

Please let us know, if you have any concerns.

 

Regards,

Joy Oyiess Rex K



JO Joy Oyiess Rex  K Syncfusion Team March 18, 2014 04:40 AM UTC

Hi Timothy,

 

We appreciate your patience.

 

We have created a simple sample based on you requirement. Please find the sample in the attachment.

 

In the provided sample, we have collapsed the default navigation buttons (left/right arrows) from the Schedule and customized the default template for  "HeaderTitleBarView" by handled the VisibleDates on the sample. As there is an issue with "Button" while place it in the “HeaderTitleBarView”, we have used a "ContentPresenter" to achieve your requirement of position the navigation button based on our requirement. And  also we have fixed the issue with "Button" in the "HeaderTitleBarView", the fix for this issue will be included in our upcoming volume release, which is estimated to be available by the end of this month.

 

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

 

Regards,

Joy Oyiess Rex K


Attachment: ScheduleHeaderFormat_WinRT_8cb0c1ad.zip


TJ Timothy J Eicher March 19, 2014 05:27 PM UTC





TJ Timothy J Eicher March 19, 2014 05:31 PM UTC

Sorry, that last reply was just to test the server, because on my last attempt at a reply the server returned an error and my text was lost.

Thank you for the provided example. It does seem to fix the problem, but it also goes to some strange lengths to get the work-around in place. From where I'm standing, it seems it would be preferable to make the properties used by the default more accessible, rather than having to do code gymnastics to get the control styled.

But nonetheless, thank you!


TJ Timothy J Eicher March 19, 2014 05:33 PM UTC

Are you aware of the the bug with the snapped views on the Schedule control? I've noticed that after moving to a different month/week/day and having the app resized, the drawing gets really messed up.


JO Joy Oyiess Rex  K Syncfusion Team replied to Timothy J Eicher March 20, 2014 04:38 AM UTC

Are you aware of the the bug with the snapped views on the Schedule control? I've noticed that after moving to a different month/week/day and having the app resized, the drawing gets really messed up.

Hi Timothy,

 

Thanks for you update.

 

We have already noted the mentioned issue and fixed it, the fix for this issue will also be included in our upcoming volume release (Vol 1 Mar , 2014), which is estimated to be available by the end of this month.

 

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

 

Regards,

Joy Oyiess Rex K



SL Sebastien Lachance April 15, 2014 06:46 PM UTC

Hello,

Concerning the Snap View, Timothy (my colleague) reported that moving to a different mode view, the drawing gets really messed up.

Now, with the new release, it causes the app to crash. The issue can be easily reproduced with the provided sample.

Is it possible to get hotfix? What is the procedure?

Thank You

Sébastien



JO Joy Oyiess Rex  K Syncfusion Team April 16, 2014 09:20 AM UTC

Hi Sébastien,

 

Thanks for your interest in Syncfusion Products.

 

Your colleague Timothy, didn’t provide us any sample regarding this issue, but we have already noted the issue and the fix for this issue was already  included in our Essential Studio Volume 1, 2014 release. If the mentioned  issue still exist in the current version (v12.1.0.43), then kindly provide us a sample along with more information to reproduce the issue. So that we can analyse on it and provide you better solution.

 

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

 

Regards,

Joy Oyiess Rex K



SL Sébastien Lachance April 16, 2014 01:20 PM UTC

Hi,

I don't understand your previous answer. Last month, we mentioned the issue that the Schedule control was not correctly drawn in the application is not on full screen (snap view) and you replied that the fix will be corrected in the 2014 volume 1.

And now you saying that you don't understand the issue. I'm confusing.

With the 2014 volume 1 version, the Schedule control will crash the application when the app is not on full screen. You can reproduce the issue with the provided sample from Syncfusion. Open the sample, compile, execute the Schedule sample and resize the application and then you switch from mode view.

I provided a zip file that contains a screenshot to show you what is an application not on full screen.

Thank you

Sébastien


Attachment: Untitled_168ea173.zip


JO Joy Oyiess Rex  K Syncfusion Team April 17, 2014 12:58 PM UTC

Hi Sébastien,

 

As in our previous version we have some, View alignment issue after resizing and  switching between views. So we have logged an issue report regarding that and fixed it. Those issue fix was already included in our 2014 Volume 1, regarding issue with "App crashed after switching the views  while snapping the schedule",  we are currently analysing on this in the sample level. we will let you know the details in two business days (Apr 22, 2014).

 

Please let us know, if you have any concerns.

 

Regards,

Joy Oyiess Rex K




JO Joy Oyiess Rex  K Syncfusion Team April 22, 2014 11:59 AM UTC

Hi Sébastien,

 

We appreciate your patience.

 

We have analysed on the reported issue and we are able to reproduce the mentioned issue in Week and WorkWeek Views of the Schedule, we have logged an issue report regarding this in our database. The fix for this issue will be included in our upcoming WinRT SP release.

 

Please let us know, if you have any concerns.

 

Regards,

Joy Oyiess Rex K



?? ???? replied to Joy Oyiess Rex  K February 27, 2018 04:49 AM UTC

Hi Timothy,

 

Thanks for your interest in Syncfusion products.

 

We have already noted the mentioned issue and we have fixed it. The fix for this issue will be included in our upcoming volume release (Vol 1 Mar , 2014), which is estimated to be available by the end of this month.

 

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

 

Regards,

Joy Oyiess Rex K


I am agree with the privacy policy and terms of service. What next?


PR Padmini Ramamurthy Syncfusion Team February 28, 2018 12:30 PM UTC

Hi, 
  
Thanks for contacting Syncfusion Support, 
  
Can you please provide more details on your technical requirement? so that, we could proceed further and assist you accordingly. 
  
Regards, 
Padmini R. 


Loader.
Live Chat Icon For mobile
Up arrow icon