This is a migrated thread and some comments may be shown as answers.

RadScheduleView not visible?

6 Answers 207 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Kwame Johnson
Top achievements
Rank 1
Kwame Johnson asked on 03 Feb 2011, 09:53 PM
Hey There-

I've been working on a Silverlight app for some time now that makes extensive use of the RadScheduler. We need the ability to alter the row height in MonthView though, so I am swtiching over to the new control (RadScheduleView). After making a few changes with respect to styling the appointments, I thought that the move over would be pretty easy; as it turns out though...I simply cannot get the control to display no matter what I do. I've tried using the most stripped down version and putting it right in the layout root without even wiring it up to any data, just to see what would happen:

<Grid x:Name="LayoutRoot">
            <telerik:RadScheduleView x:Name="scheduleView" >
                <telerik:RadScheduleView.ViewDefinitions>
                    <telerik:MonthViewDefinition />
                </telerik:RadScheduleView.ViewDefinitions>
            </telerik:RadScheduleView>
</Grid>

I would expect to see an empty ScheduleView here but again...just a blank space where the RadScheduler used to be. No errors...no nothing. The weird thing is...the control is definitely "there". If I break when the layout is updated and check properties on the ScheduleView such as height, width, activeviewdefinition...they are all set properly. Any idea what I am doing wrong?

For what it's worth, im using version 2010.3.1317.1040 of the ScheduleView; the other Telerik dlls are all 2010.3.1314.1040.

-K

6 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 04 Feb 2011, 08:08 AM
Hello,

RadScheduleView needs you to set both ViewDefinitions and AppointmentsSource in order to display the appointments grid. If you do not set those properties it displays a message saying what you need to set. However, I assume that you are not seeing this message too, so probably the reason for the problem is missing control template. I suggest trying with a newer version of RadScheduleView (available in the sticky thread on top of this forum) as probably you have downloaded one of the first two broken builds that we uploaded (the one of those missed the control templates).

Best wishes,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Kwame Johnson
Top achievements
Rank 1
answered on 04 Feb 2011, 10:20 PM
Thanks for the quick response - grabbing a newer version alleviated that problem, so of course its on to the next one.

Predictably, the ScheduleView is displaying, but it's empty. The AppointmentsSource has been set properly...when I check the count at runtime there are appointments in it...they just aren't showing for some reason. I was thinking it could be an issue with the AppointmentStyleSelector or EditAppointmentDialogStyle, so I removed those property settings from the xaml, which didn't fix the issue.

Could it be related to the fact that all of my appointments are all day? The application is really to display events such as site launches, promotions, etc...the length is always at the day level. Doesn't seem like it should matter in month view, which is the only view we allow.

Let me know what you think...
0
Kwame Johnson
Top achievements
Rank 1
answered on 09 Feb 2011, 01:55 AM
Hey There-

Still no luck getting the ScheduleView to populate. XAML for the scheduler itself follows:

<telerik:RadScheduleView Grid.Row="2" Canvas.ZIndex="0" Canvas.Top="25" x:Name="scheduleView" Height="600" HorizontalAlignment="Stretch" Loaded="scheduler_Loaded"
    AppointmentCreating="scheduler_AppointmentCreating" AppointmentCreated="scheduler_AppointmentCreated" AppointmentEditing="scheduler_AppointmentEditing"
    AppointmentEdited="scheduler_AppointmentEdited" AppointmentDeleting="scheduler_AppointmentDeleting" AppointmentDeleted="scheduler_AppointmentDeleted" 
    AppointmentsSource="{Binding Path=SMCAppointments}" Visibility="Visible" AppointmentStyleSelector="{StaticResource AppointmentItemStyleSelector}" >
    <telerik:RadScheduleView.ViewDefinitions>
        <telerik:MonthViewDefinition FirstDayOfWeek="Sunday" />
    </telerik:RadScheduleView.ViewDefinitions>
    <telerik:RadContextMenu.ContextMenu >
        <telerik:RadContextMenu >
            <telerik:RadMenuItem  Header="{Binding Path=ApplicationStrings.CreateMenuNewEvent, Source={StaticResource ResourceWrapper}}" Click="NewEvent_Click" />
            <telerik:RadMenuItem  Header="{Binding Path=ApplicationStrings.CreateMenuNewTask, Source={StaticResource ResourceWrapper}}" Click="NewTask_Click" />
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
</telerik:RadScheduleView>

If you could even just point me in a direction it would be extremely helpful. I have omitted EditAppointmentDialogStyle just in case the style I was using for it was the source of the issue - I didnt think that would impact the appointments showing up at all but maybe I was wrong? I have included an OrientedAppointmentItemStyleSelector in my grid resources and have two styles I reference - I have no issues building but maybe the problem is with those? I have also omitted anything to do with ResourceTypes or Grouping for simplicity's sake.

Again, when I check at runtime, the AppointmentsSource is populated, but that is never reflected on the UI. It has to be something really simple that's right in front of my face but I have no idea what it could be.

Kwame
0
George
Telerik team
answered on 09 Feb 2011, 03:30 PM
Hi,

Please, double check your Canvas.ZIndex order. Also, we will greatly appreciate a sample project of yours. It will definitely help us in further pinpointing and resolving the problem. Can you attach the sample project to this thread? 

 

Greetings,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Kwame Johnson
Top achievements
Rank 1
answered on 10 Feb 2011, 09:30 PM
As it turns out, it doesn't look like the new control responds to the CollectionChanged event on the AppointmentsSource collection appropriately. We have too much data to load it all at once...I only load data for the month being viewed. As the user scrolls to new months, I grab that data and add those appointments to the AppointmentsSource. I couldn't figure out what the issue was until I loaded my application, saw the empty month view, scrolled forward and then back to the same month initially loaded to find it populated with events.

What it comes down to is that if you set your AppointmentsSource in the XAML, and then subsequently add appointments to the source without doing anything explicit to make the ScheduleView reload (like changing months), the appointments you add never show up on the UI. I got around this issue on the initial load by simply not setting the AppointmentSource in the XAML...I now set it in the code behind after all of my events and tasks (aka appointments) are loaded. But it's still a problem when scrolling from month to month. Maybe I'm missing something but the behavior just doesn't seem right. I never had to do anything special in this regard with the RadScheduler.
0
Hristo
Telerik team
answered on 14 Feb 2011, 03:04 PM
Hi Kwame Johnson,

RadScheduleView respond to CollectionChanged on the AppointmentsSource. However we had a bug in case of Reset (when you Clear the collection). It is fixed now and will be available with next internal build and with the upcoming 2011 Q1 beta.

Thank you for reporting this issue. I've updated your telerik points.

Regards,
Hristo
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
ScheduleView
Asked by
Kwame Johnson
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Kwame Johnson
Top achievements
Rank 1
George
Telerik team
Hristo
Telerik team
Share this question
or