Hi I have been playing around with the Scheduler its a pretty cool control I would like to be able to display more than just the title and description when you select an appointment is it possible to include an additional filed from te database that would show in the appointment window?
thks
M
thks
M
16 Answers, 1 is accepted
0
Schlurk
Top achievements
Rank 2
answered on 09 Feb 2010, 02:23 PM
You should be able to do this quite easily. I think if you look over the Custom Resources and Attributes documentation article you can get some further insight on how to accomplish this.
0
Hello Mike,
You can also review the Advanced Templates demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx
Best wishes,
Peter
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
You can also review the Advanced Templates demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx
Best wishes,
Peter
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
mike john
Top achievements
Rank 1
answered on 10 Feb 2010, 07:41 PM
Thank you both for the reply I now have a drop down box, however I am trying to display a url (idealy in a text box so the user could dl a file stored on the server :-) )
is there a way to change the type of additional recource types field or did I miss somthing
thanks
M
is there a way to change the type of additional recource types field or did I miss somthing
thanks
M
0
mike john
Top achievements
Rank 1
answered on 10 Feb 2010, 08:05 PM
I am now getting an error when you select an appointment it shows the appointment window I have a description field which has <p> to format the text view however if I select close using the X button I get
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (RadScheduler1_Form_Description_text="<p>
Praesent ut jus...").
if I remove the <p> its fine obviously this is not very good for a normal user why is it giving an error when it put the <p> in the first place ???
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (RadScheduler1_Form_Description_text="<p>
Praesent ut jus...").
if I remove the <p> its fine obviously this is not very good for a normal user why is it giving an error when it put the <p> in the first place ???
0
Hi Mike,
You might find useful the Using Templates demo. You can use a custom attribute to store the url for the appointment.
All the best,
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.
You might find useful the Using Templates demo. You can use a custom attribute to store the url for the appointment.
All the best,
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
mike john
Top achievements
Rank 1
answered on 17 Feb 2010, 11:28 AM
Thanks for the reply I have managed to show a text box that displays the url of the file (when it is stored in the database its gets stored as http://localhost/(folder)/file.zip ) is it possible to make the contents of that text box a clickable link
thanks
Mike
thanks
Mike
0
Hello mike,
It might be better to use a link directly, instead of a textbox. For example:
<a href='<%# Eval("UrlPath") %>'>uploaded file</a>, where UrlPath is your custom attribute.
Let me know if there is a reason why you cannot use this approach.
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.
It might be better to use a link directly, instead of a textbox. For example:
<a href='<%# Eval("UrlPath") %>'>uploaded file</a>, where UrlPath is your custom attribute.
Let me know if there is a reason why you cannot use this approach.
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
mike john
Top achievements
Rank 1
answered on 19 Feb 2010, 06:17 PM
Hi thanks for your reply I currently have
Where would I add your referance so the fileUpload becomes a link
thanks
M
| <telerik:ResourceStyleMapping ApplyCssClass="" Key="fileUpload" Text="" |
| Type="http://" /> |
| </ResourceStyles> |
| <AppointmentContextMenus> |
| <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server" |
| DataMember="DefaultView" DataNavigateUrlField="fileUpload" DataTextFormatString="url" |
| DataSourceID="SqlDataSource1" DataTextField="fileUpload" |
| DataValueField="fileUpload" Height="10px" Width="100%"> |
| </telerik:RadSchedulerContextMenu> |
| </AppointmentContextMenus> |
| <AdvancedForm EnableCustomAttributeEditing="True" /> |
| </telerik:RadScheduler> |
Where would I add your referance so the fileUpload becomes a link
thanks
M
0
Hello Mike,
You can add the link in the advanced form templates or the appointment template:
Greetings,
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.
You can add the link in the advanced form templates or the appointment template:
<telerik:RadScheduler ID="RadScheduler1" runat="server"> <AdvancedEditTemplate> *** </AdvancedEditTemplate> <AdvancedInsertTemplate> *** </AdvancedInsertTemplate> <AppointmentTemplate> *** </AppointmentTemplate> </telerik:RadScheduler>Greetings,
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
mike john
Top achievements
Rank 1
answered on 23 Feb 2010, 07:27 PM
Thanks for the reply please see this doc I have added screen shots so you can see the outputs
http://students.comp.glam.ac.uk/05020441/code.doc
thanks
Mike
http://students.comp.glam.ac.uk/05020441/code.doc
thanks
Mike
0
mike john
Top achievements
Rank 1
answered on 27 Feb 2010, 03:23 PM
Anyone able to point me in the right place or explain why the correct url is not showing
0
Hi mike,
It looks like you are not using the AdvancedEditTemplate or AdvancedInsertTemplate. If you just need to add the download file link, you don't really have to use the advanced templates, because there is an easier way to achieve this by handling FormCreated as follows:
Please, try the above code and let us know how it goes.
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.
It looks like you are not using the AdvancedEditTemplate or AdvancedInsertTemplate. If you just need to add the download file link, you don't really have to use the advanced templates, because there is an easier way to achieve this by handling FormCreated as follows:
protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e) { if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert) { Panel submitArea = e.Container.FindControl("ButtonsPanel").Parent as Panel; HyperLink link1 = new HyperLink(); link1.Text= "upload file"; link1.NavigateUrl = e.Appointment.Attributes["fileUpload"]; submitArea.Controls.Add(link1); } }Please, try the above code and let us know how it goes.
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
mike john
Top achievements
Rank 1
answered on 01 Mar 2010, 03:15 PM
Hi thanks for the reply I converted your code to vb so I have the following
when I select a date from the calander it opens the edit event (appointment) window I can see all the details but no button or link for the file dl
see attached
| Imports Telerik.Web.UI |
| Partial Class users_Default |
| Inherits System.Web.UI.Page |
| Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs) |
| If e.Container.Mode = SchedulerFormMode.AdvancedEdit OrElse OrElse e.Container.Mode = SchedulerFormMode.AdvancedInsert Then |
| Dim submitArea As Panel = TryCast(e.Container.FindControl("ButtonsPanel").Parent, Panel) |
| Dim link1 As New HyperLink() |
| link1.Text = "upload file" |
| link1.NavigateUrl = e.Appointment.Attributes("fileUpload") |
| submitArea.Controls.Add(link1) |
| End If |
| End Sub |
| End Class |
when I select a date from the calander it opens the edit event (appointment) window I can see all the details but no button or link for the file dl
see attached
0
Hi mike,
I think the event is not wired properly, so FormCreated is not handled at all. Can you attach to this event from the designer and paste the code in the event handler. Usually, the event handler will be auto generated and wired with 'Handles RadScheduler1.FormCreated '. For example:
All the best,
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.
I think the event is not wired properly, so FormCreated is not handled at all. Can you attach to this event from the designer and paste the code in the event handler. Usually, the event handler will be auto generated and wired with 'Handles RadScheduler1.FormCreated '. For example:
Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated End SubAll the best,
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
mike john
Top achievements
Rank 1
answered on 07 Mar 2010, 11:18 AM
Hi thanks for the reply I have included both files that I am using
regards
Mike
regards
Mike
| <%@ Page Language="VB" validateRequest=false AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="users_Default" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <form id="form1" runat="server"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <link href="../b_style.css" rel="stylesheet" type="text/css" /> |
| <head id="Head1" runat="server"> |
| <title>User Home</title> |
| </head> |
| <body> |
| <div id="b_container"> |
| <div class="b_content_top"> |
| </div> |
| <div id="b_content"> |
| <div class="banner"> |
| <div class="logo"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| </div> |
| </div> |
| <div id="b_menu"> |
| <div class="menuright"></div> |
| <div class="menuleft"></div> |
| <ul> |
| <li><a href="Default.aspx" class="current">Home</a></li> |
| <li><asp:LoginStatus ID="LoginStatus1" runat="server" |
| LogoutAction="RedirectToLoginPage" LogoutPageUrl="~/Login.aspx" /></li> |
| <li><a href="Help_FAQ.aspx">Help FAQ</a></li> |
| <li><a href="Newjob.aspx">New Job</a></li> |
| <li><a href="ChangePassword.aspx">Change Password</a></li> |
| <li><a href="#">Reports</a></li> |
| </ul> |
| </div> |
| <div id="b_2columns"> |
| <b>Current Live Jobs:</b><br /> |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" |
| DataDescriptionField="jobDescription" DataEndField="jobEnd" |
| ValidateRequest="false" ValidationGroup="none" |
| DataKeyField="jobId" DataSourceID="SqlDataSource1" DataStartField="jobLive" |
| DataSubjectField="jobName" Skin="Windows7" Height="100%" |
| SelectedView="MonthView" Width="780px" CustomAttributeNames="fileUpload" |
| DataMember="DefaultView"> |
| <AdvancedForm EnableCustomAttributeEditing="True" /> |
| <AdvancedInsertTemplate> |
| <a href='<%# Eval("fileUpload") %>'>uploaded file</a> |
| </AdvancedInsertTemplate> |
| </telerik:RadScheduler> |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" |
| ConnectionString="<%$ ConnectionStrings:JT2010ConnectionString %>" |
| SelectCommand="SELECT [id], [jobId], [jobName], [jobType], [jobLive], [jobEnd], [jobStatus], [UserId], [fileUpload], [jobDescription] FROM [Jobs]"> |
| </asp:SqlDataSource> |
| </div> |
| </div> |
| <div class="b_content_bottom"></div> |
| <div id="b_footer"> <a href="Default.aspx">Home </a> | <a href="">Support Wiki</a> | <a href=""> |
| Contact Us</a><br /> |
| all rights reserved 2009 - 2010</div> |
| </div> |
| </div> |
| </form> |
| </body> |
| </html> |
| Imports Telerik.Web.UI |
| Partial Class users_Default |
| Inherits System.Web.UI.Page |
| Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs) |
| If e.Container.Mode = SchedulerFormMode.AdvancedEdit OrElse e.Container.Mode = SchedulerFormMode.AdvancedInsert Then |
| Dim submitArea As Panel = TryCast(e.Container.FindControl("ButtonsPanel").Parent, Panel) |
| Dim link1 As New HyperLink() |
| link1.Text = "upload file" |
| link1.NavigateUrl = e.Appointment.Attributes("fileUpload") |
| submitArea.Controls.Add(link1) |
| End If |
| End Sub |
| End Class |
0
Hi,
As Peter explained, you should modify your code as follows:
Greetings,
Dimitar Milushev
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.
As Peter explained, you should modify your code as follows:
Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated If e.Container.Mode = SchedulerFormMode.AdvancedEdit OrElse e.Container.Mode = SchedulerFormMode.AdvancedInsert Then Dim submitArea As Panel = TryCast(e.Container.FindControl("ButtonsPanel").Parent, Panel) Dim link1 As New HyperLink() link1.Text = "upload file" link1.NavigateUrl = e.Appointment.Attributes("fileUpload") submitArea.Controls.Add(link1) End IfEnd SubGreetings,
Dimitar Milushev
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.