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

Dynamically creating AdvancedInsertTemplate

4 Answers 87 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
giridharan
Top achievements
Rank 1
giridharan asked on 20 Feb 2009, 06:11 AM
 I am trying to creat an AdvancedEditTemplate using the IBindableTemplate property.I coundn't succeed in creating AdvancedEditTemplate or AdvancedInsertTemplate using IBindableTemplate and i could not bind the values like subject,start and End and also im going to add custom attributes to it.So, it ll be helpful for me if u provide me a example or an layout on creating AdvancedEditTemplate using IBindableTemplate.

                    Thanks.

4 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 20 Feb 2009, 12:04 PM
Hi,

I am attaching you a minimal example that demonstrates how to create Advanced Insert/Edit template by implementing IBindableTemplate. Let us know if you have problems with the implementation of your template.

Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
giridharan
Top achievements
Rank 1
answered on 20 Feb 2009, 03:31 PM
Hi Tsonev,
                Thanks for ur reply.I worked out the example that u have given and it looks similarly like the one i used and i referred the example given in this post http://www.telerik.com/community/forums/aspnet-ajax/scheduler/problem-using-itemplate-for-advancedinserttemplate.aspx and even with both the examples im getting the same problem.
            The problem is when im cliking on the insert then our Custom AdvancedInsertTemplate is getting loaded and after then when im cliking on the save Linkbutton then the default  AdvancedInsertTemplate is getting displayed instead of RadScheduler1_AppointmentInsert Event to be triggered.So i need a solution to come across this problem.

             Thanks.
0
T. Tsonev
Telerik team
answered on 24 Feb 2009, 08:59 AM
Hi giri,

I'm sorry for the delayed response. I've received your code sample and the problem seems to be that you are setting the templates in the Page_Load method. This should be done earlier in the page life cycle, otherwise the templates will not work correctly after postback.

The OnInit method is the preferred place for such code. Moving it there should solve the problem:

protected override void OnInit(EventArgs e)
{
    base.OnInit(e);

    RadScheduler1.AdvancedInsertTemplate = new AdvancedTemplate(true);
    RadScheduler1.AdvancedEditTemplate = new AdvancedTemplate(false);
}



Sincerely yours,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
A. Koster
Top achievements
Rank 1
answered on 24 Feb 2009, 01:12 PM
Hi Tsonev,
                Thanks for ur reply.That solution Works Great!
                
Tags
Scheduler
Asked by
giridharan
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
giridharan
Top achievements
Rank 1
A. Koster
Top achievements
Rank 1
Share this question
or