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

RadScheduler Update problem with master page.

9 Answers 126 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mohsin
Top achievements
Rank 1
Mohsin asked on 01 Mar 2011, 05:19 PM
I have an application with master page, I placed rad-scheduler under RadAjaxPanel on my content page with ScriptManager/RadScriptManager. When I insert any appointment it works fine but when i update any appointment it does not work, it fails to update.
Similarly when I do the same work in my simple ASPX page without any master page it works fine for me.
In both case i use SQLDataSource wizard to select,insert,update and delete from RadScheduler.

Please help me out I am stuck.
Urgent response is appreciated 

Regards,
Mohsin

9 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 02 Mar 2011, 09:03 AM
Hi Mohsin,

Basically you need to put the RadScriptManager / ScriptManager control in the Master Page. Please try to move the RadScriptManager in the master page and check how it goes.

If this doesn't helps could you please send me your code so I can inspect it and help you?

Thank you!

Best wishes,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Mohsin
Top achievements
Rank 1
answered on 02 Mar 2011, 10:42 AM
Hi Veronica,

I placed RadScriptManager/ScriptManager in master page but it does not work for me. Issue still remain.
However i tried creating user control with RadAjaxPanel and put the control on content page but still result same.

Here I am sending my ASPX file code.
Note: RadScriptManager/ScriptManager is palced in master page under form tag and below same code is written in user control

=======================================================================================

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <style>
    .example-panel
{
    width: 870px;
    height:585px;
    background: transparent url('Images/background.png') no-repeat 0 0;
    padding: 55px 0 0 8px;
}
.RadSplitter
{
    border: none !important;
    margin: 0 !important;
}


.RadPanelBar .rootGroup
{
    border-left: none;
    border-right: none;
}


.calendar-container
{
    width:220px;
    margin: 0 auto 7px auto;
}


.calendar-title
{
    height: 26px;
    padding: 6px 5px;
    font-size: 16px;
    font-color: #1e395b;
}


#RadScheduler1Panel
{
    width: 100%;
    overflow: hidden;
}


div.RadScheduler
{
    }


/* Styles for the appointment Subject */
.RadScheduler .rsAptSubject
{
    text-align: left;
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: bold;
    color: #369;
    height: 17px;
    border-bottom: 1px solid #8bf;
    width: 100%;
    overflow: hidden;
}    


/* Remove the Subject underline for all-day appointments */
.RadScheduler .rsAllDayRow .rsAptSubject
{
    border-bottom: none;
}


div.RadScheduler .rsCategoryPattern .rsAptContent, div.RadScheduler .rsCategoryPattern .rsAptIn, div.RadScheduler .rsCategoryPattern .rsAptMid
{
 background: url('Images/pattern.png') repeat-x left top;
}
    </style>
         <div id="header-shadow">
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" 
                    width="100%">
                    <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="EndDate" 
                        DataKeyField="AppointmentID" DataSourceID="SqlDataSource1" 
                        DataStartField="StartDate" DataSubjectField="Subject" Height="">
                    </telerik:RadScheduler>
                    <br />
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM [MR_Appointment] WHERE [AppointmentID] = @AppointmentID" 
                        InsertCommand="INSERT INTO [MR_Appointment] ([Subject], [StartDate], [EndDate]) VALUES (@Subject, @StartDate, @EndDate)" 
                        SelectCommand="SELECT [AppointmentID], [Subject], [StartDate], [EndDate] FROM [MR_Appointment]" 
                        UpdateCommand="UPDATE [MR_Appointment] SET [Subject] = @Subject, [StartDate] = @StartDate, [EndDate] = @EndDate WHERE [AppointmentID] = @AppointmentID">
                        <DeleteParameters>
                            <asp:Parameter Name="AppointmentID" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="Subject" Type="String" />
                            <asp:Parameter Name="StartDate" Type="DateTime" />
                            <asp:Parameter Name="EndDate" Type="DateTime" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Subject" Type="String" />
                            <asp:Parameter Name="StartDate" Type="DateTime" />
                            <asp:Parameter Name="EndDate" Type="DateTime" />
                            <asp:Parameter Name="AppointmentID" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </telerik:RadAjaxPanel>
    </div>
</asp:Content>


Regards,
Mohsin
0
Veronica
Telerik team
answered on 02 Mar 2011, 11:38 AM
Hello Mohsin,

I've created a sample project with RadScheduler bound to SqlDataSource and MasterPage.
Please take a look at the project in the attached .zip file, compare it with your code and let me know how it goes.

Regards,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Mohsin
Top achievements
Rank 1
answered on 02 Mar 2011, 01:21 PM
Hi Veronica,

Thanks for sample project.

I have tried your provided sample project it works fine for me, I have copied that project code and put in my application with slight modification as per my application but again I am unable to get the desired results.

Following are the Rad components that I am using in my page

1. ScriptManager placed in master page
2. RadSplitter with different Pane 
3. RadAjaxManager
4. RadAjaxLoadingPanel
5. RadCalender
6. RadPanelBar
7.SqlDataSource

By combining all the components, I have created my Appointment.aspx content page.
But still I am unable to update any appointment from RadSchedular; but when I Drag any appointment to different date it update the schedular as well as in database this is strange.....!!

Please help me out.

Regards,
Mohsin
0
Veronica
Telerik team
answered on 02 Mar 2011, 04:47 PM
Hi Mohsin,

Could you please send me your project as well as the database so I can inspect it and help you?

Thank you!

P.S: As this is a forum post you will not be allowed to attach .zip files. Please upload your project in one of the sites for free online storage as 4shared.com

All the best,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Mohsin
Top achievements
Rank 1
answered on 16 Mar 2011, 10:40 AM
Hi Veronica,

Apology for late reply...I was stuck in some urgent work.

The said issue was resolved, there was a problem in my aspx code.
Few html tags were missing that was causing the problem in schedular update operation.
I fixed that and its working fine.

Thank you for your support and time.

Regards,
Mohsin

0
Veronica
Telerik team
answered on 16 Mar 2011, 10:46 AM
Hello Mohsin,

I am glad that I've been able to resolve the issue.

Please feel free to ask me if you have further questions.

Kind regards,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Mohsin
Top achievements
Rank 1
answered on 24 Mar 2011, 04:04 PM
Hi Veronica,

Yes sure I will ask help from you if i feel any difficulty.
I have a little query from you.

Can radschedular control run fine when i add the runat="server" attribute in HTML tag, keeping in mind that master page contain HTML tag.


Regards,
Mohsin
0
Accepted
Veronica
Telerik team
answered on 30 Mar 2011, 08:22 AM
Hello Mohsin,

Could you please be more specific on your requirement? Why you need to add the runat="server" to html tag?

Please note that RadScheduler inherits form WebControl as all server controls in the ASP.NET AJAX Framework. If you add the runat="server" attribute to any html tag - you will make the corresponding control HTML Server control. Please take a look at this MSDN article for more information on HTML Server controls.

Best wishes,
Veronica Milcheva
the Telerik team
Tags
Scheduler
Asked by
Mohsin
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Mohsin
Top achievements
Rank 1
Share this question
or