
Andy Green
Top achievements
Rank 1
Andy Green
asked on 03 Aug 2009, 08:23 AM
Hi
My Schedule is currently showing data from a database in the appointment section. This data contains HTML, but the tags are being shown and are not being rendered as HTML. Is there a HTMLEncode equivalent like bound colunms on Rad / data grids.
This is what is displayed:QEH <br/> BWH <br/> DCC
This is the view source:QEH <br/> BWH <br/> DCC
This is what I want:
QEH
BWH
DCC
Or is there another way to achieve this.
Andy
My Schedule is currently showing data from a database in the appointment section. This data contains HTML, but the tags are being shown and are not being rendered as HTML. Is there a HTMLEncode equivalent like bound colunms on Rad / data grids.
This is what is displayed:QEH <br/> BWH <br/> DCC
This is the view source:QEH <br/> BWH <br/> DCC
This is what I want:
QEH
BWH
DCC
Or is there another way to achieve this.
Andy
5 Answers, 1 is accepted
0
Accepted
Hi Andy,
You can easily workaround this problem using AppontmentTemplate:
Greetings,
Peter
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.
You can easily workaround this problem using AppontmentTemplate:
<AppointmentTemplate> |
<asp:Panel ID="Panel1" runat="server"> |
</asp:Panel> |
</AppointmentTemplate> |
protected void RadScheduler1_AppointmentCreated(object sender, Telerik.Web.UI.AppointmentCreatedEventArgs e) |
{ |
string[] subjectArray = Regex.Split(e.Appointment.Subject, "</br>"); |
Panel subjectPanel = e.Container.FindControl("Panel1") as Panel; |
foreach (string subPart in subjectArray) |
{ |
Literal subjectLine = new Literal(); |
subjectLine.Text = subPart + "</br>"; |
subjectPanel.Controls.Add(subjectLine); |
} |
} |
Greetings,
Peter
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
Hi again Andy,
I don't know why I went this way for a workaround, when actually there is a much simpler solution:
Sorry for the unnecessarily complicated previous solution.
Peter
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.
I don't know why I went this way for a workaround, when actually there is a much simpler solution:
<AppointmentTemplate> |
<%# Eval("Subject") %> |
</AppointmentTemplate> |
Sorry for the unnecessarily complicated previous solution.
Peter
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

Andy Green
Top achievements
Rank 1
answered on 02 Sep 2009, 09:58 AM
Hi Team
Things have change with this, and the scheduler now sits inside a repeater control. But......
Neither proposed option works,
With the first option it fails because the with events refers to the control that is wrapped inside the repeater and it cant find it.
'Handles clause requires a WithEvents variable defined in the containing type or one of its base types'
The second method - The data I wish to show is created for the RadScheduler, ie the repeater has a datafield value for week number, this week number is passsed into the itemcreated to get the appointment data for the scheuler, so this wont work either.
How can I achieve this with my current set up.
Andy
Things have change with this, and the scheduler now sits inside a repeater control. But......
Neither proposed option works,
With the first option it fails because the with events refers to the control that is wrapped inside the repeater and it cant find it.
'Handles clause requires a WithEvents variable defined in the containing type or one of its base types'
The second method - The data I wish to show is created for the RadScheduler, ie the repeater has a datafield value for week number, this week number is passsed into the itemcreated to get the appointment data for the scheuler, so this wont work either.
How can I achieve this with my current set up.
Andy
0
Hello Andy,
This is a VB.NET problem. The solution which I found in the forums is to set the event handler declaratively:
and to remove "Handles RadScheduler1.AppointmentCreated" from the event handler:
Regards,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
This is a VB.NET problem. The solution which I found in the forums is to set the event handler declaratively:
* * * |
<telerik:RadScheduler runat="server" ID="RadScheduler1" OnAppointmentCreated="RadScheduler1_AppointmentCreated"> |
* * * |
and to remove "Handles RadScheduler1.AppointmentCreated" from the event handler:
Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) |
End Sub |
Regards,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Andy Green
Top achievements
Rank 1
answered on 03 Sep 2009, 02:13 PM
Brilliant - thank you.
BTW - I do search the forums before I post, but I guess it's knowing what to search for.
Andy
BTW - I do search the forums before I post, but I guess it's knowing what to search for.
Andy