Hi Telerik,
I have a problem with the RadScheduler and exporting the appointment when loading templates. I took a look at your solution at http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx and found that when i use dynamic loaded templates it doesn't work correct with my OnAppointmentCommand event method:
I have this in my aspx page:
protected void Page_PreRender(object o, EventArgs e)
{
switch (radScheduler.SelectedView)
{
case SchedulerViewType.DayView:
{
radScheduler.AppointmentTemplate = LoadTemplate("Controls/DayViewTemplate.ascx");
break;
}
}
}
Default.aspx:
function Export(sender, event) {
alert(sender.name);
$find("<%=RadAjaxManager1.ClientID %>").__doPostBack(sender.name,"");
}
My template is simple at the moment and looks like this (for testing):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DayViewTemplate.ascx.cs" Inherits="Modules_Scheduler_Controls_DayViewTemplate" %>
<asp:Button ID="lbExport" runat="server" CommandName="Export" Text="iCalendar" OnClientClick="Export(this,event); return false;"></asp:Button>
When I use alert(sender.name) from the javascript I get this "ctl00$Content2$radScheduler$ctl97$ctl01$lbExport" and it throws a postback that just doesnt reach the OnAppointmentCommand
However if I take what is in my template and use it directly on the aspx page like:
<Telerik:RadScheduler ....>
<AppointmentTemplate>
<asp:Button ID="lbExport" runat="server" CommandName="Export" Text="iCalendar" OnClientClick="Export(this,event); return false;"></asp:Button>
</AppointmentTemplate>
Any tips or help would be much appreciated.
Best regards
Thomas
I have a problem with the RadScheduler and exporting the appointment when loading templates. I took a look at your solution at http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx and found that when i use dynamic loaded templates it doesn't work correct with my OnAppointmentCommand event method:
I have this in my aspx page:
protected void Page_PreRender(object o, EventArgs e)
{
switch (radScheduler.SelectedView)
{
case SchedulerViewType.DayView:
{
radScheduler.AppointmentTemplate = LoadTemplate("Controls/DayViewTemplate.ascx");
break;
}
}
}
Default.aspx:
function Export(sender, event) {
alert(sender.name);
$find("<%=RadAjaxManager1.ClientID %>").__doPostBack(sender.name,"");
}
My template is simple at the moment and looks like this (for testing):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DayViewTemplate.ascx.cs" Inherits="Modules_Scheduler_Controls_DayViewTemplate" %>
<asp:Button ID="lbExport" runat="server" CommandName="Export" Text="iCalendar" OnClientClick="Export(this,event); return false;"></asp:Button>
When I use alert(sender.name) from the javascript I get this "ctl00$Content2$radScheduler$ctl97$ctl01$lbExport" and it throws a postback that just doesnt reach the OnAppointmentCommand
However if I take what is in my template and use it directly on the aspx page like:
<Telerik:RadScheduler ....>
<AppointmentTemplate>
<asp:Button ID="lbExport" runat="server" CommandName="Export" Text="iCalendar" OnClientClick="Export(this,event); return false;"></asp:Button>
</AppointmentTemplate>
</Telerik:RadScheduler>
It throws the correct postback with the command and reaches my Event method. And I get my export file for iCalendar.
So my problem is the above doesn't work when I dynamic load templates for the RadScheduler. So I was wondering if I'm doing something wrong? It throws the correct postback with the command and reaches my Event method. And I get my export file for iCalendar.
Any tips or help would be much appreciated.
Best regards
Thomas