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

Navigation problems with querry optimization

6 Answers 75 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Timothy Kruszewski
Top achievements
Rank 1
Timothy Kruszewski asked on 13 May 2010, 06:08 PM
I'm using querry optimization to return data for a particular date range on the schedule.  When I click on the left or right arrow the page is not rebiding the data.  I have to click to go button to get the scheduler to rebind.  Below is the code I'm using.  From all of the examples I've seen this should be working properly but it's not.

<telerik:RadScheduler ID="RadScheduler1" runat="server" Width="900px" TimelineView-NumberOfSlots="5" 
            Skin="Default" EnableEmbeddedSkins="true" EnableEmbeddedBaseStylesheet="false" 
            GroupingDirection="Vertical" OnAppointmentDelete="RadScheduler1_AppointmentDelete" 
            OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" 
            OnFormCreating="RadScheduler1_FormCreating" OnDataBound="RadScheduler1_OnDataBound" 
            OnNavigationComplete="RadScheduler1_NavigationComplete" StartInsertingInAdvancedForm="True" 
            AdvancedForm-ZIndex="2000" AdvancedForm-Modal="True">  
            <MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" /> 
            <TimelineView SlotDuration="12:00:00" NumberOfSlots="10" TimeLabelSpan="2" /> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsUsers" ForeignKeyField="UserID" KeyField="UserID" 
                    Name="User Name" TextField="UserName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsClients" ForeignKeyField="ClientID" KeyField="ClientID" 
                    Name="Client Name" TextField="ClientName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsCategories" ForeignKeyField="CategoryID" KeyField="CategoryID" 
                    Name="Category" TextField="Category" /> 
            </ResourceTypes> 
            <ResourceStyles> 
                <telerik:ResourceStyleMapping Type="Category" Text="Out of Office" ApplyCssClass="rsCategoryViolet" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="After Hours" ApplyCssClass="rsCategoryRed" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="Projects" ApplyCssClass="rsCategoryDarkGreen" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="MACs" ApplyCssClass="rsCategoryGreen" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="VNMS" ApplyCssClass="rsCategoryDarkBlue" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="IPT/Engineering" ApplyCssClass="rsCategoryDarkRed" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="Other" ApplyCssClass="rsCategoryOrange" /> 
            </ResourceStyles> 
            <TimeSlotContextMenuSettings EnableDefault="true" /> 
            <AppointmentContextMenuSettings EnableDefault="true" /> 
        </telerik:RadScheduler> 
    </telerik:RadAjaxPanel> 

protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!IsPostBack)  
        {  
            ddlView.SelectedIndex = 1;  
            RadScheduler1.SelectedView = SchedulerViewType.TimelineView;  
            RadScheduler1.SelectedDate = DateUtilities.GetStartOfCurrentWeekMonday();  
            BindSchedule();  
        }  
 
        RadScheduler1.GroupBy = RadComboBox1.SelectedValue;  
    }  
 
 private void BindSchedule()  
    {  
        RadScheduler1.DataSource = TED.BLL.Appointment.Appointments(SafeValue.SafeInt(ddlView.SelectedValue),SafeValue.SafeInt(ddlCategory.SelectedValue),SafeValue.SafeInt(ddlClientName.SelectedValue),Users,RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd);  
        RadScheduler1.DataKeyField = "ID";  
        RadScheduler1.DataStartField = "Start";  
        RadScheduler1.DataEndField = "End";  
        RadScheduler1.DataSubjectField = "Subject";  
        RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";  
        RadScheduler1.DataRecurrenceField = "RecurrenceRule";  
 
        RadScheduler1.DataBind();  
    }  
 
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)  
    {  
        RadScheduler scheduler1 = (RadScheduler)sender;  
        if (e.Command == SchedulerNavigationCommand.SwitchToMonthView)  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Expand;  
        }  
        else  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Scroll;  
        }  
        BindSchedule();  
    } 


6 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 May 2010, 01:48 PM
Hello Timothy,

I used this help topic to create two different datasources for RadScheduler and bind the control as in your code. Everything seemed to work correctly. To test the case, navigate to May 15, 2010 and you will see an appointment with subject 'b'. If you comment the code in NavigationComplete, and navigate to May 15, 2010, an appointment with subject 'a' will show up. 
 
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
   {
        BindSchedule(Appointments2);
   }

If you continue to experience problems, I suggest you open a support ticket and send us a simple working demo for testing.


Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Timothy Kruszewski
Top achievements
Rank 1
answered on 17 May 2010, 09:21 PM
Unfortunately it's still not working.  I do see the code stepping into the mehtod and I ran a sql trace to confirm data is being returned but it does not render it on the scheduler.
0
Peter
Telerik team
answered on 19 May 2010, 01:49 PM
Hello Timothy,

Can you modify the demo I sent you so that the problem occurs and then send it back to us via a support ticket?

Thanks.

Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Timothy Kruszewski
Top achievements
Rank 1
answered on 19 May 2010, 05:20 PM
I broke the shceduler down to it's most basic components and was able to get it working with the navigation.  As I started adding components back in I found the navigation failed to load with the ResourceTypes

<ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsUsers" ForeignKeyField="UserID" KeyField="UserID" 
                    Name="User Name" TextField="UserName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsClients" ForeignKeyField="ClientID" KeyField="ClientID" 
                    Name="Client Name" TextField="ClientName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsCategories" ForeignKeyField="CategoryID" KeyField="CategoryID" 
                    Name="Category" TextField="Category" /> 
            </ResourceTypes> 
0
Peter
Telerik team
answered on 21 May 2010, 02:01 PM

Still, we will need a simple working demo to be able to suggest a solution.


Kind regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Timothy Kruszewski
Top achievements
Rank 1
answered on 24 May 2010, 05:31 PM
I resolved the problem by adding the rebind method as shown below.

 RadScheduler scheduler1 = (RadScheduler)sender;  
        if (e.Command == SchedulerNavigationCommand.SwitchToMonthView)  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Expand;  
        }  
        else  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Scroll;  
        }  
        BindSchedule();  
        RadScheduler1.Rebind(); 
Tags
Scheduler
Asked by
Timothy Kruszewski
Top achievements
Rank 1
Answers by
Peter
Telerik team
Timothy Kruszewski
Top achievements
Rank 1
Share this question
or