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

Advanced Edit Template

16 Answers 236 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gerrit du Preez
Top achievements
Rank 1
Gerrit du Preez asked on 01 Oct 2010, 03:00 PM
Is there a way to load the Advanced Edit Template of the Scheduler without having to double click on an appointment?

I have tried the following:

RadScheduler1.Appointments.FindByID
RadScheduler1.ShowAdvancedEditForm(apt);

It displays the Advanced Edit Template, but then the Edit functionality of the page is lost.  When the same page is edited by clicking on an appointment, the edit functionality works.

Thanks

Gerrit

16 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 06 Oct 2010, 01:13 PM
Hello Gerrit,

Please, set StartEditingInAdvancedForm="true" and StartInsertingInAdvancedForm="true" for RadScheduler.


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
Hitesh
Top achievements
Rank 1
answered on 01 Nov 2010, 12:47 PM
Hello,

I am getting "Object reference not set to an instance of an object." Error when Click on save button inside Edit Appointment.

Please Help ME !!!!

Error Content

Server Error in '/TelerikControls' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.AdvancedTemplate.get_RecurrenceRuleText() +552
   Telerik.Web.UI.AdvancedTemplate.ExtractValues(Control container) +444
   Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions) +137
   Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +468
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
0
T. Tsonev
Telerik team
answered on 04 Nov 2010, 02:00 PM
Hello Hitesh,

Thank you for submitting the full stack trace.

The error doesn't seem to be related to the StartEditingInAdvancedForm and StartInsertingInAdvancedForm properties. We tried to reproduce this error, but without success. We need to understand your scenario better in order to proceed. Can you please send us the source code of the page?

Greetings,
Tsvetomir Tsonev
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
Matthew
Top achievements
Rank 1
answered on 04 Feb 2011, 07:46 PM
I'm getting the same error since upgrading to Q3 of the controls, and also changing my 'toolscriptmanager' to a 'radscriptmanager'. To see this stack trace I had to use:

EnableScriptCombine="false" EnablePartialRendering="false" OutputCompression="Disabled"

In the scriptmanager, or I would get an error in the the Microsoft ajax javascript file instead.

I get this error when saving or updating with one of the schedulers advanced insert/edit forms.

My Scheduler is populated via a cusom provider (that connects to a microsoft exchange service) set in the code behind on load.

The scheduler markup is very basic, and it uses it's default functionality/templates.

<telerik:RadScheduler ID="LiveAtEduCalendar"                      
                      Skin="Forest"                   
                      SelectedView="MonthView"
                      FirstDayOfWeek="Monday"
                      LastDayOfWeek="Sunday"                      
                      AppointmentStyleMode="Default"
                      ShowFooter="false"  
                      OnLoad="LiveAtEduCalendar_Load"                
                      runat="server">
    <WeekView HeaderDateFormat="d" />
    <TimelineView UserSelectable="false" />
</telerik:RadScheduler>
0
Peter
Telerik team
answered on 07 Feb 2011, 02:08 PM
Hello Matthew,

We haven't been able to replicate this problem locally. Can you try with some other data source, SQL or XML provider for example and let me know if this makes a difference?


Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Adnan Aslam
Top achievements
Rank 1
answered on 09 Feb 2011, 10:34 AM
Hello  i am using example of "SchedulerCustomAdvancedFormQ1_2010_SP1" as reference to override AdvanceTemplate and trying to create the replicate form but with different ID's and Name. Here is detail of what  i am trying to do. I am approximately half way through but dont know the source of error that is not letting this project functionality complete and i suspect there will be probably some sequence mistake.

Project Reference : SchedulerCustomAdvancedFormQ1_2010_SP1

Functionality:
Instead of using Type and Resrouce as AdvanceTemplate Resources, i am trying to use Institute Name (InstituteName) and Institute Address (InstituteAddress) as resources in form of ComboBoxs.
Backend in SQLdatabase, i am using three tables.
1. Appointments
2. Institute_Name
3. Institute_Address

Institute_Name primary key is Inst_Sr_Id and Institute_Address primary key is Inst_Add_Sr and both are Foreign Keys in Appointments table.

Here is code that is used to bind their properties.
'Type, Resource   
    <Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
    Public Property InstituteName() As String
        Get
            Return InstituteNameComboBox.SelectedItem.Value
        End Get

        Set(ByVal value As String)
            InstituteNameComboBox.SelectedValue = value
        End Set
    End Property

    <Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
    Public Property InstituteAddress() As String
        Get
            Return InstituteAddressComboBox.SelectedItem.Value
        End Get

        Set(ByVal value As String)
            InstituteAddressComboBox.SelectedValue = value
        End Set
    End Property

Below is code that override InstituteName and InstituteAddress property and bind it to Control in AdvanceTemplate

<AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1"
                Mode="Edit" Subject='<%# Bind("Subject") %>'
                Description='<%# Bind("Description") %>'
                Start='<%# Bind("Start") %>'
                End='<%# Bind("End") %>'
                RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                AppointmentColor='<%# Bind("AppointmentColor") %>'
                InstituteName  = '<%# Bind("InstituteName")%>'
                InstituteAddress= '<%# Bind("InstituteAddress")%>'
                />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
            
                <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1"
                    Mode="Insert"   Subject='<%# Bind("Subject") %>'
                    Description='<%# Bind("Description") %>'
                    Start='<%# Bind("Start") %>'
                    End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>'
                     InstituteName  = '<%# Bind("InstituteName")%>'
                InstituteAddress= '<%# Bind("InstituteAddress")%>'
                    />
            </AdvancedInsertTemplate>

The above code did help me to store Appointment Information but it was not helping to store Institute Name and Institute Address value into database untill i added the following code:

<telerik:ResourceType ForeignKeyField="Inst_Sr_Id"
                KeyField="Inst_Sr_Id" Name="InstituteName" TextField="Inst_Name" />
<telerik:ResourceType ForeignKeyField="Inst_Add_Sr"
                KeyField="Inst_Add_Sr" Name="InstituteAddress" TextField="Inst_Address" />
</ResourceTypes>

Now the Appointment Color, Institute Name and Address are getting store properly in Database BUT, once i try to edit any appointment, Institute_Name and Institute_Address does't pick their default value that is stored in database. Their behavoir is kind of normal which means on return value from database to Advance control, Values are not getting bind.

In AdvanceTemplate.ASCX, I am using two RadComboBox controll with Two SQLDatasource to populate data from database. Institute_Name popolate institute name data from Institute_Name table and on selection of any particular insitute, InstituteAddressComboBox change its data and pick all list of address that associate to particular Institute.

Can you please look into code and suggest for the following Issue
1. why Two way binding is not working for RadComboBox ( InstituteName and InstituteAddress)
2. In Appointment Template why the following Code is not working.
<AppointmentTemplate>
          <div class="rsAptSubject">
                <h3><%# Eval("Subject") %></h3>
           </div>
                <%# Eval("Description") %>
            <P>
                    Institute : <i><%#Eval("InstituteName.Text")%></i>
            </P>
             <P>
                  Address : <i><%#Eval("InstituteAddress.Text")%></i>
              </P>
</AppointmentTemplate>

I have Also changed the CustomAttributeNames to :
CustomAttributeNames="AppointmentColor,InstituteName,InstituteAddress"

May be i am asking too much ! or may be i have explained alot and problem could be minor. Please help so i may assemble it for demonstration to my supirors.

Regards
Adnan
0
Veronica
Telerik team
answered on 14 Feb 2011, 11:23 AM
Hello Gerrit du Preez,

Thank you for the detailed explanation. I was able to understand your issue. However I'll need your code so I can inspect it and tell you what is wrong.

Could you please send me your project as well as the database?

Thank you!

Regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
chukwu
Top achievements
Rank 1
answered on 22 Sep 2012, 01:29 AM

May i ask you whether you manage to get this issue resolved by Telerik? 2am in the night and I am having the same problem.

This is the error I am getting when I try to save a new appointment.
Object reference not set to an instance of an object.

 

NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.AdvancedTemplate.get_RecurrenceRuleText() +554
   Telerik.Web.UI.AdvancedTemplate.ExtractValues(Control container) +479
   Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions) +160
...


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17626

And following the schedule example on the documents.
And I am using the same Appointments.xml.
And I haven't made any changes to the code either.

Please advice

Thanks and Cheers

0
Boyan Dimitrov
Telerik team
answered on 26 Sep 2012, 09:51 AM
Hello Chukwu,

It is not very clear how to reproduce the issue you described. That is why I prepared a sample project based on this Code Library  that uses AdvancedTemplate for RadScheduler AdvancedForm . RadScheduler is using XML document as data source and its AdvacedTemplate markup code can be found in AdvacedFrom.ascx file. Please review ti and let me know what should I change in order to observe the same behavior.

I hope this will be helpful.


Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Puc
Top achievements
Rank 1
answered on 02 Sep 2014, 03:05 PM
Hi,

Have been trying to create a brand new appointment for the past 4 weeks. But it keep son throwing the same error as reported by a few of you above.

Scenario:
As my appointment resources can have multiple values (eg; Room 1, Room2), I am using a custom database provider using Entity Framework 6. I couldn't register the provider using the Web.Config it just kept on throwing error, so I am setting provider in the Page_Load of the code behind.
Using the Inline Advanced Insert template when I try to the save appointment information, it keeps throwing the below error.
Its been close to 3 weeks struggling with this same error and any help will be HIGHLY appreciated!

This is stack trace -
Object reference not set to an instance of an object.
   at Telerik.Web.UI.AdvancedTemplateBase.get_RecurrenceRuleText()
   at Telerik.Web.UI.AdvancedTemplateBase.ExtractValues(Control container)
   at Telerik.Web.UI.RadScheduler.InsertAppointmentInline()
   at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)






0
Boyan Dimitrov
Telerik team
answered on 05 Sep 2014, 10:49 AM
Hello,

We tried to reproduce this error, but without success. We need to understand your scenario better in order to proceed. In order to debug and investigate this problem we would need a sample page or project we can test with. Could you please open a support ticket and attach a runnable sample project that replicates this error?

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Puc
Top achievements
Rank 1
answered on 05 Sep 2014, 03:13 PM

Resolved it :-)

My Scenario?
Use Entity Framework with a Custom Databae Provider

What was I trying to do?
I am using a custom database provider to bind the Scheduler. This provider uses Entity Framework 6 to connecto the database. I couldn't register the provider using the Web.Config it just kept on throwing error -
"Parser Error Message: Unable to find the requested .Net Framework Data Provider. It may not be installed"
So I had to set the provider in the Page_Load of the code behind. Using the Inline Insert template when I tried to the save an appointment,  I kept on getting this below error -
"Object reference not set to an instance of an object.
at Telerik.Web.UI.AdvancedTemplateBase.get_RecurrenceRuleText()
at Telerik.Web.UI.AdvancedTemplateBase.ExtractValues(Control container)
at Telerik.Web.UI.RadScheduler.InsertAppointmentInline()
at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"

Root Cause?
Any custom databaseprovider needs a classic ADO.NET connection string associated with it in the web.config file. That connection string can be fake and crap but it is still required. In my scenario I had this in my web.config file -
<connectionStrings>
<add name="EFConnection" connectionString="metadata=res://*/ModelEF.csdl|res://*/ModelEF.ssdl|res://*/ModelEF.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=DBServer;initial catalog=SampleDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<telerik.web.ui>
<radScheduler defaultAppointmentProvider="Integrated">
<appointmentProviders>
<add name="DBSchedulerData" type="TestDataProvider.DataProviderEF" connectionStringName="EFConnection" persistChanges="true" />
</appointmentProviders>
</radScheduler>
</telerik.web.ui>

Though everything is correct here, I kept on getting the above two errors because that connection string was for EntityFramework.

Solution?
To fix all these errors I added a new fake connection string to my web.config file. And associated this new sonnection string with my custom provider. Here is my updated web.config -

<connectionStrings>
<add name="EFConnection" connectionString="metadata=res://*/ModelEF.csdl|res://*/ModelEF.ssdl|res://*/ModelEF.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=DBServer;initial catalog=SampleDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
<add name="FakeConnection" connectionString="Data Source=fakebaby;initial catalog=fakeuser;integrated security=True;" providerName="System.Data.SqlClient" />
</connectionStrings>
<telerik.web.ui>
<radScheduler defaultAppointmentProvider="Integrated">
<appointmentProviders>
<add name="DBSchedulerData" type="TestDataProvider.DataProviderEF" connectionStringName="FakeConnection" persistChanges="true" />
</appointmentProviders>
</radScheduler>
</telerik.web.ui>

0
Ferdows
Top achievements
Rank 1
answered on 04 Feb 2015, 06:32 PM
I exactly have same problem as previous post that when I am try to save an appointment or updating I am facing to the error of: object reference is not set to an instance of object.
I attached a sample project i did scheduler on it.
Please leave a message if someone find where is is the problem.
thanks,
0
Ismael
Top achievements
Rank 1
answered on 11 Feb 2015, 01:31 PM
Hi ,

I have the same issue  . I am triying to edit an appointement from a user shared calendar  but get the exception  :

 Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at Telerik.Web.UI.AdvancedTemplateBase.get_RecurrenceRuleText()
   at Telerik.Web.UI.AdvancedTemplateBase.ExtractValues(Control container)
   at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
   at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)

Any idea ?

Thanks a lot
0
Daniel
Top achievements
Rank 1
answered on 10 Oct 2015, 02:27 PM

I am also now receiving an null reference error when opening an appointment in the advanced template and then trying to save it.  Same exact stack trace. This is code that has existed and worked for over a year now.  No changes to it at all  2 things have changed in the environment.

We migrated to EF 6 (from 5)
We migrated to 2015.2.623.45

 

 

The stack trace does not give very good direction and we can't seem to break into the error, so we are not sure what direction to look... any thoughts or direction would be helpful. 

Thanks

 

 

0
Plamen
Telerik team
answered on 14 Oct 2015, 07:28 AM
Hello,

Unfortunately we could not replicate the issue. You can try to isolate it into a sample project and submit a support ticket about it so we could inspect tit and be more helpful.

Regards,
Plamen
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
Gerrit du Preez
Top achievements
Rank 1
Answers by
Peter
Telerik team
Hitesh
Top achievements
Rank 1
T. Tsonev
Telerik team
Matthew
Top achievements
Rank 1
Adnan Aslam
Top achievements
Rank 1
Veronica
Telerik team
chukwu
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Puc
Top achievements
Rank 1
Ferdows
Top achievements
Rank 1
Ismael
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or