Hi Team,
I've implemented the rad scheduler and rad tool tip
for
appointment.
BUt no links
in
rad header doesn't work.
example
if
i click
1.today link, not working
2.calender date click link, not working
3.day view tab, not working
4.timeline view tab, not working
5.week view tab, not working
here
is
my scheduler coding...please help me
<telerik:RadAjaxLoadingPanel ID=
"RadAjaxLoadingPanel1"
Width=
"100%"
runat=
"server"
Skin=
"WebBlue"
>
</telerik:RadAjaxLoadingPanel>
<div style="width: 803px; background: transparent url(
'Images/background.png'
) no-repeat 0 0;
padding-left: 20px;">
<telerik:RadScheduler runat=
"server"
ID=
"RadScheduler1"
Skin=
"Web20"
CustomAttributeNames=
"StartTime,EndTime,SessionDate,DisplayPermitName,EventStartDate,DisplayClientVisibility,DisplayResourceVisibility,DisplayFacilityVisibility,EventEndDate,ID,DisplayPermitVisibility,DisplayFacilityName,DisplayResourceName,DisplayClientName,Event_ID"
DataStartField=
"EventStartDate"
EnableDatePicker=
"true"
GroupingDirection=
"Horizontal"
MonthView-GroupingDirection=
"Horizontal"
DataEndField=
"EventEndDate"
DayStartTime=
"08:00:00"
DayEndTime=
"23:00:00"
ShowFullTime=
"true"
DataKeyField=
"ID"
style=
"white-space:normal;"
FirstDayOfWeek=
"Sunday"
LastDayOfWeek=
"Saturday"
DataSubjectField=
"DisplayPermitName"
EnableEmbeddedSkins=
"false"
AllowDelete=
"false"
AllowEdit=
"false"
TimelineView-NumberOfSlots=
"7"
AllowInsert=
"false"
OnAppointmentDataBound=
"RadScheduler1_AppointmentDataBound"
>
<AdvancedForm Modal=
"true"
/>
<AppointmentTemplate>
<div
class
=
"AlignCenter"
>
<%--Permit Name--%>
<asp:LinkButton runat=
"server"
ID=
"lblDisplayPermitName"
OnClick=
"RedirectToEventMaintenance"
Style=
"font-weight: bold; color: White; font-size: 14px;"
CommandArgument=
'<%# Eval("Event_ID") + "~" + Eval("SessionDate") %>'
Visible=
'<%# Convert.ToBoolean(Eval("DisplayPermitVisibility")) %>'
>
<%# Eval(
"DisplayPermitName"
)%>
</asp:LinkButton><br />
<%--Start Time--%>
<%--End Time--%>
<%# Eval(
"StartTime"
)%>
-
<%# Eval(
"EndTime"
)%>
<br />
<%--Client Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayClientTypeName"
Text=
"<left>Client Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayClientVisibility")) %>'
>
<%# Eval(
"DisplayClientName"
)%>
</asp:Label><br />
<%--Facility Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayFacilityName"
Text=
"<left>Facility Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayFacilityVisibility")) %>'
>
<%# Eval(
"DisplayFacilityName"
)%>
</asp:Label>
<br />
<%--Resource Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayResourceName"
Text=
"<left>Resource Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayResourceVisibility")) %>'
>
<%# Eval(
"DisplayResourceName"
)%>
</asp:Label><br />
</div>
</AppointmentTemplate>
</telerik:RadScheduler>
<telerik:RadToolTipManager runat=
"server"
ID=
"RadToolTipManager1"
Width=
"220"
Height=
"100"
ToolTipZoneID=
"RadScheduler1"
Animation=
"None"
HideEvent=
"LeaveToolTip"
Text=
"Loading..."
RelativeTo=
"Mouse"
OnAjaxUpdate=
"RadToolTipManager1_AjaxUpdate"
OnClientBeforeShow=
"clientBeforeShow"
>
</telerik:RadToolTipManager>
</div>
Thanks,
Janni
9 Answers, 1 is accepted
0
Janni
Top achievements
Rank 1
answered on 19 Nov 2010, 05:41 AM
Hi Team,
Is anyone there?
Can u please reply my issues.
Waiting for your quick reply.
Thanks,
Janni
Is anyone there?
Can u please reply my issues.
Waiting for your quick reply.
Thanks,
Janni
0
Janni
Top achievements
Rank 1
answered on 22 Nov 2010, 06:08 AM
Hi,
is anyone there to solve my problem?
waiting the solution reply for this post for a long time...
pls reply me.
is anyone there to solve my problem?
waiting the solution reply for this post for a long time...
pls reply me.
0
Hello Janni,
Do you get any javascript errors? If yes, please check the General Troubleshooting and the Web Resources Troubleshooting help topics.
Also, can you test what happens if you remove the RadToolTipManager or/and the RadAjaxLoadingPanel. If you use RadAjaxManager or RadAjaxPanel, take them out of the scenario and check if this helps.
Best wishes,
Peter
the Telerik team
Do you get any javascript errors? If yes, please check the General Troubleshooting and the Web Resources Troubleshooting help topics.
Also, can you test what happens if you remove the RadToolTipManager or/and the RadAjaxLoadingPanel. If you use RadAjaxManager or RadAjaxPanel, take them out of the scenario and check if this helps.
Best wishes,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart 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
Janni
Top achievements
Rank 1
answered on 22 Nov 2010, 10:55 AM
Hi Peter,
Once i removed the RadAjaxLoadingPanel and RadAjaxManager, the view links are working fine.
But if i click the day to month view, the page getting refreshed.
The page shouldn't get refreshed. The scheduler must change its view by its loading panel.
What should i do for that loading atone in scheduler itself once i change the view????
Thanks,
Janni
Once i removed the RadAjaxLoadingPanel and RadAjaxManager, the view links are working fine.
But if i click the day to month view, the page getting refreshed.
The page shouldn't get refreshed. The scheduler must change its view by its loading panel.
What should i do for that loading atone in scheduler itself once i change the view????
Thanks,
Janni
0
Please, send us the entire code of your implementation so we can test it locally.
Cheers,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart 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
Janni
Top achievements
Rank 1
answered on 24 Nov 2010, 05:24 AM
Hi peter,
here
is
my code
.aspx page
-----------
<asp:Content ID=
"Content1"
ContentPlaceHolderID=
"head"
runat=
"server"
>
</asp:Content>
<asp:Content ID=
"Content2"
ContentPlaceHolderID=
"ContentPlaceHolder1"
runat=
"server"
>
<div
class
=
"caption"
style=
"margin-left: 10px; width: 820px"
>
<table width=
"100%"
class
=
"maargintop10"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td align=
"left"
>
<asp:Label ID=
"labelCaption"
Text=
"Event Scheduler"
runat=
"server"
/>
</td>
</tr>
</table>
<hr
class
=
"horizantalRuler"
/>
</div>
<div
class
=
"maarginleft20 divborder marginright20"
>
<asp:Panel ID=
"panelSearch"
DefaultButton=
"imgbtnAddNew"
runat=
"server"
>
<div
class
=
"divSearchHeaderWithoutCursor"
>
<asp:Label ID=
"label1"
runat=
"server"
Text=
"Event Scheduler Search Criteria"
CssClass=
"divSearchHeaderText"
/>
</div>
<br />
<div>
<%--Client--%>
<label
class
=
"formlabel100"
style=
"margin-left: 30px;"
>
Client</label>
<asp:DropDownList CssClass=
"textBox150"
ID=
"dropDownListClient"
runat=
"server"
>
</asp:DropDownList>
<%--Facility--%>
<label
class
=
"formlabelCommon marginleft225"
>
Facility</label>
<asp:DropDownList ID=
"dropDownListFacility"
CssClass=
"textBox150"
runat=
"server"
>
</asp:DropDownList>
<br />
<br />
<%--Resources--%>
<label
class
=
"formlabel100"
style=
"margin-left: 30px;"
>
Resource
</label>
<asp:DropDownList CssClass=
"textBox150"
ID=
"dropDownListResource"
runat=
"server"
>
</asp:DropDownList>
<%--Search--%>
<asp:ImageButton ID=
"imgbtnAddNew"
runat=
"server"
CssClass=
"marginleft225"
OnClick=
"searchBtn_Click"
ImageUrl=
"~/Images/search_btn.png"
/>
</div>
<br />
</asp:Panel>
</div>
<br />
<%-- <telerik:RadAjaxLoadingPanel ID=
"RadAjaxLoadingPanel1"
Width=
"100%"
runat=
"server"
Skin=
"WebBlue"
>
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager runat=
"server"
ID=
"RadAjaxManager1"
>
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID=
"RadScheduler1"
>
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID=
"RadToolTipManager1"
LoadingPanelID=
"RadAjaxLoadingPanel1"
/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager> --%>
<div style="width: 803px; background: transparent url(
'Images/background.png'
) no-repeat 0 0;
padding-left: 20px;">
<telerik:RadScheduler runat=
"server"
ID=
"RadScheduler1"
Skin=
"Web20"
CustomAttributeNames=
"StartTime,EndTime,SessionDate,DisplayPermitName,EventStartDate,DisplayClientVisibility,DisplayResourceVisibility,DisplayFacilityVisibility,EventEndDate,ID,DisplayPermitVisibility,DisplayFacilityName,DisplayResourceName,DisplayClientName,Event_ID"
DataStartField=
"EventStartDate"
EnableDatePicker=
"true"
GroupingDirection=
"Horizontal"
EnableEmbeddedSkins=
"true"
MonthView-GroupingDirection=
"Horizontal"
DataEndField=
"EventEndDate"
DayStartTime=
"08:00:00"
DayEndTime=
"23:00:00"
ShowFullTime=
"true"
DataKeyField=
"ID"
FirstDayOfWeek=
"Sunday"
LastDayOfWeek=
"Saturday"
DataSubjectField=
"DisplayPermitName"
AllowDelete=
"false"
AllowEdit=
"false"
TimelineView-NumberOfSlots=
"7"
AllowInsert=
"false"
OnAppointmentDataBound=
"RadScheduler1_AppointmentDataBound"
>
<AdvancedForm Modal=
"true"
/>
<AppointmentTemplate>
<div
class
=
"AlignCenter"
>
<%--Permit Name--%>
<asp:LinkButton runat=
"server"
ID=
"lblDisplayPermitName"
OnClick=
"RedirectToEventMaintenance"
Style=
"font-weight: bold; color: White; font-size: 14px;"
CommandArgument=
'<%# Eval("Event_ID") + "~" + Eval("SessionDate") %>'
Visible=
'<%# Convert.ToBoolean(Eval("DisplayPermitVisibility")) %>'
>
<%# Eval(
"DisplayPermitName"
)%>
</asp:LinkButton><br />
<%--Start Time--%>
<%--End Time--%>
<%# Eval(
"StartTime"
)%>
-
<%# Eval(
"EndTime"
)%>
<br />
<%--Client Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayClientTypeName"
Text=
"<left>Client Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayClientVisibility")) %>'
>
<%# Eval(
"DisplayClientName"
)%>
</asp:Label><br />
<%--Facility Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayFacilityName"
Text=
"<left>Facility Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayFacilityVisibility")) %>'
>
<%# Eval(
"DisplayFacilityName"
)%>
</asp:Label>
<br />
<%--Resource Name--%>
<asp:Label runat=
"server"
ID=
"lblDisplayResourceName"
Text=
"<left>Resource Name :</left>"
Visible=
'<%# Convert.ToBoolean(Eval("DisplayResourceVisibility")) %>'
>
<%# Eval(
"DisplayResourceName"
)%>
</asp:Label><br />
</div>
</AppointmentTemplate>
</telerik:RadScheduler>
</div>
<telerik:RadToolTipManager runat=
"server"
ID=
"RadToolTipManager1"
Width=
"220"
Height=
"100"
ToolTipZoneID=
"RadScheduler1"
Animation=
"Resize"
HideEvent=
"LeaveToolTip"
Text=
"Loading..."
RelativeTo=
"Mouse"
OnAjaxUpdate=
"RadToolTipManager1_AjaxUpdate"
OnClientBeforeShow=
"clientBeforeShow"
>
</telerik:RadToolTipManager>
<telerik:RadCodeBlock ID=
"radCodeBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function hideActiveToolTip() {
var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
if
(tooltip) {
tooltip.hide();
}
}
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
function beginRequestHandler(sender, args) {
var prm = Sys.WebForms.PageRequestManager.getInstance();
if
(args.get_postBackElement().id.indexOf(
'RadScheduler1'
) != -1) {
hideActiveToolTip();
}
}
function clientBeforeShow(sender, eventArgs) {
w = $telerik.$(window).width() / 2;
h = $telerik.$(window).height() / 2;
if
((sender._mouseX > w) && (sender._mouseY > h)) {
sender.set_position(Telerik.Web.UI.ToolTipPosition.TopLeft);
return
;
}
if
((sender._mouseX < w) && (sender._mouseY > h)) {
sender.set_position(Telerik.Web.UI.ToolTipPosition.TopRight);
return
;
}
if
((sender._mouseX > w) && (sender._mouseY < h)) {
sender.set_position(Telerik.Web.UI.ToolTipPosition.BottomLeft);
return
;
}
sender.set_position(Telerik.Web.UI.ToolTipPosition.BottomRight);
}
</script>
</telerik:RadCodeBlock>
</asp:Content>
.cs page
---------
public
partial
class
EventScheduler : ClassReg20Base
{
#region Properties
/// <summary>
/// Properties
/// </summary>
public
SiteTrackEventController EventController {
get
;
set
; }
public
SiteTrackResourceController ResourceController {
get
;
set
; }
public
SiteTrackMasterController MasterController {
get
;
set
; }
public
SiteTrackClientController ClientController {
get
;
set
; }
public
AdminMaintenanceController AdminController {
get
;
set
; }
#endregion
#region Constructor
/// <summary>
/// Constructor EventMaintenance()
/// </summary>
public
EventScheduler()
{
this
.EventController =
new
SiteTrackEventController();
this
.ResourceController =
new
SiteTrackResourceController();
this
.MasterController =
new
SiteTrackMasterController();
this
.ClientController =
new
SiteTrackClientController();
this
.AdminController =
new
AdminMaintenanceController();
}
#endregion
#region PageLoad
/// <summary>
/// PageLoad
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
Page_Load(
object
sender, EventArgs e)
{
try
{
if
(Session[UIConfigurationConstant.UserSession] !=
null
)
userSession = (UserSession)Session[UIConfigurationConstant.UserSession];
else
Response.Redirect(UIConfigurationConstant.LOGINNAVIGATIONPATH);
this
.AdminController.State.Event =
new
Event(userSession);
this
.AdminController.State.Event.Permit =
new
Permit(userSession);
this
.AdminController.State.Session =
new
Softura.ClassReg20.Business.Admin.Session.Session(userSession);
this
.AdminController.State.Session.Schedule =
new
Schedule(userSession);
this
.ResourceController.State.Facility =
new
Softura.ClassReg20.Business.SiteTrack.Resource.Facility(userSession);
this
.ResourceController.State.Resource =
new
Softura.ClassReg20.Business.SiteTrack.Resource.Resource(userSession);
this
.MasterController.State.ClientType =
new
ClientType(userSession);
this
.ClientController.State.Client =
new
Softura.ClassReg20.Business.SiteTrack.Client.Client(userSession);
RadScheduler1.AppointmentCreated += RadScheduler1_AppointmentCreated;
RadScheduler1.DataBound += RadScheduler1_OnDataBound;
dropDownListClient.Focus();
if
(!IsPostBack)
{
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
RadScheduler1.MonthView.VisibleAppointmentsPerDay = 3;
FillControls();
}
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
#endregion
#region Events
/// <summary>
/// Populates the controls with data from the Business Objects.
/// ClassReg20 User Interface will perform the concrete implementation of this method.
/// </summary>
protected
override
void
FillControls()
{
try
{
//Client Dropdownlist
dropDownListClient.Items.Clear();
dropDownListClient.DataSource =
this
.ClientController.RetrieveAllClient();
dropDownListClient.DataTextField = UIConfigurationConstant.NAME;
dropDownListClient.DataValueField = UIConfigurationConstant.Id;
dropDownListClient.DataBind();
ListItem itemSelectClient =
new
ListItem(UIConfigurationConstant.SELECT, UIConfigurationConstant.ZERO);
dropDownListClient.Items.Insert(0, itemSelectClient);
//Resource Dropdownlist
dropDownListResource.Items.Clear();
dropDownListResource.DataSource =
this
.ResourceController.RetrieveAllResource();
dropDownListResource.DataTextField = UIConfigurationConstant.NAME;
dropDownListResource.DataValueField = UIConfigurationConstant.Id;
dropDownListResource.DataBind();
ListItem itemSelectResource =
new
ListItem(UIConfigurationConstant.SELECT, UIConfigurationConstant.ZERO);
dropDownListResource.Items.Insert(0, itemSelectResource);
//Facility Dropdownlist
dropDownListFacility.Items.Clear();
dropDownListFacility.DataSource =
this
.ResourceController.RetrieveAllFacility();
dropDownListFacility.DataTextField = UIConfigurationConstant.NAME;
dropDownListFacility.DataValueField = UIConfigurationConstant.Id;
dropDownListFacility.DataBind();
ListItem itemSelectFacility =
new
ListItem(UIConfigurationConstant.SELECT, UIConfigurationConstant.ZERO);
dropDownListFacility.Items.Insert(0, itemSelectFacility);
this
.AdminController.State.Session.Schedule =
new
Schedule(userSession);
this
.AdminController.State.Session.Schedules =
this
.AdminController.RetrieveAllEventSchedules();
if
(
this
.AdminController.State.Session.Schedules.Count > 0)
{
this
.RadScheduler1.DataSource =
this
.AdminController.State.Session.Schedules;
DateTime dataEventStartDate = DateTime.Parse(
this
.AdminController.State.Session.Schedules[0].SessionDate.ToString());
DateTime dataEventEndDate = DateTime.Parse(
this
.AdminController.State.Session.Schedules[
this
.AdminController.State.Session.Schedules.Count - 1].SessionDate.ToString());
foreach
(Schedule schedule
in
this
.AdminController.State.Session.Schedules)
{
dataEventStartDate = DateTime.Parse(schedule.SessionDate.ToString());
dataEventEndDate = DateTime.Parse(schedule.SessionDate.ToString());
DateTime EventStartTime1 = Convert.ToDateTime(schedule.StartTime);
schedule.EventStartTime = EventStartTime1.ToString(
"u"
).Substring(10);
DateTime EventEndTime1 = Convert.ToDateTime(schedule.EndTime);
schedule.EventEndTime = EventEndTime1.ToString(
"u"
).Substring(10);
schedule.EventStartDate = dataEventStartDate.ToString(
"u"
).Substring(0, 10);
schedule.EventEndDate = dataEventEndDate.ToString(
"u"
).Substring(0, 10);
Appointment apt =
new
Appointment();
string
Starthour = schedule.EventStartTime.Split(
':'
)[0] +
"."
+ schedule.EventStartTime.Split(
':'
)[1];
string
Endhour = schedule.EventEndTime.Split(
':'
)[0] +
"."
+ schedule.EventEndTime.Split(
':'
)[1];
apt.ID = schedule.ID;
apt.Start = Convert.ToDateTime(schedule.EventStartDate).AddHours(Convert.ToDouble(Starthour));
apt.End = Convert.ToDateTime(schedule.EventEndDate).AddHours(Convert.ToDouble(Endhour));
schedule.EventStartDate = apt.Start.ToString();
schedule.EventEndDate = apt.End.ToString();
RadScheduler1.InsertAppointment(apt);
}
this
.RadScheduler1.DataBind();
}
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// Populates the Business Objects with data by calling the corresponding UI Controller.
/// ClassReg20 User Interface will perform the concrete implementation of this method.
/// </summary>
protected
override
void
FillBusinessObjects()
{
try
{
this
.AdminController.State.Session.Schedule =
new
Schedule(userSession);
if
(dropDownListClient.SelectedIndex > 0)
this
.AdminController.State.Session.Schedule.Client.Id =
new
Guid(dropDownListClient.SelectedItem.Value);
if
(dropDownListFacility.SelectedIndex > 0)
this
.AdminController.State.Session.Schedule.Facility.Id =
new
Guid(dropDownListFacility.SelectedItem.Value);
if
(dropDownListResource.SelectedIndex > 0)
this
.AdminController.State.Session.Schedule.Resource.Id =
new
Guid(dropDownListResource.SelectedItem.Value);
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
#endregion
#region Methods
/// <summary>
/// RedirectToEventMaintenance
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
RedirectToEventMaintenance(
object
sender, EventArgs e)
{
try
{
LinkButton linkButtonEvent = (LinkButton)sender;
UrlQueryStringPasser url =
new
UrlQueryStringPasser(UIConfigurationConstant.EVENT_MAINTENANCE_NAVIGATION_PATH);
string
[] arguments = linkButtonEvent.CommandArgument.Split(
'~'
);
url[UIConfigurationConstant.CODE] = arguments[0];
url[UIConfigurationConstant.STRINGVALUE] = arguments[1];
url[UIConfigurationConstant.STATUS] = Convert.ToString(Operation.Edit);
url.RedirectPage();
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// Search Button
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
searchBtn_Click(
object
sender, EventArgs e)
{
try
{
FillBusinessObjects();
this
.AdminController.State.Session.Schedules =
this
.AdminController.RetrieveAllEventSchedules();
this
.RadScheduler1.DataSource =
this
.AdminController.State.Session.Schedules;
if
(
this
.AdminController.State.Session.Schedules.Count > 0)
{
DateTime dataEventStartDate = DateTime.Parse(
this
.AdminController.State.Session.Schedules[0].SessionDate.ToString());
DateTime dataEventEndDate = DateTime.Parse(
this
.AdminController.State.Session.Schedules[
this
.AdminController.State.Session.Schedules.Count - 1].SessionDate.ToString());
foreach
(Schedule schedule
in
this
.AdminController.State.Session.Schedules)
{
dataEventStartDate = DateTime.Parse(schedule.SessionDate.ToString());
dataEventEndDate = DateTime.Parse(schedule.SessionDate.ToString());
DateTime EventStartTime1 = Convert.ToDateTime(schedule.StartTime);
schedule.EventStartTime = EventStartTime1.ToString(
"u"
).Substring(10);
DateTime EventEndTime1 = Convert.ToDateTime(schedule.EndTime);
schedule.EventEndTime = EventEndTime1.ToString(
"u"
).Substring(10);
schedule.EventStartDate = dataEventStartDate.ToString(
"u"
).Substring(0, 10);
schedule.EventEndDate = dataEventEndDate.ToString(
"u"
).Substring(0, 10);
Appointment apt =
new
Appointment();
string
Starthour = schedule.EventStartTime.Split(
':'
)[0] +
"."
+ schedule.EventStartTime.Split(
':'
)[1];
string
Endhour = schedule.EventEndTime.Split(
':'
)[0] +
"."
+ schedule.EventEndTime.Split(
':'
)[1];
apt.ID = schedule.ID;
apt.Start = Convert.ToDateTime(schedule.EventStartDate).AddHours(Convert.ToDouble(Starthour));
apt.End = Convert.ToDateTime(schedule.EventEndDate).AddHours(Convert.ToDouble(Endhour));
schedule.EventStartDate = apt.Start.ToString();
schedule.EventEndDate = apt.End.ToString();
RadScheduler1.InsertAppointment(apt);
}
this
.RadScheduler1.DataBind();
}
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
#endregion
#region Scheduler Events
/// <summary>
/// RadScheduler1_OnDataBound
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
RadScheduler1_OnDataBound(
object
sender, EventArgs e)
{
try
{
RadToolTipManager1.TargetControls.Clear();
ScriptManager.RegisterStartupScript(
this
,
typeof
(Page),
"HideToolTip"
,
"hideActiveToolTip();"
,
true
);
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// RadScheduler1_AppointmentDataBound
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
RadScheduler1_AppointmentDataBound(
object
sender, Telerik.Web.UI.SchedulerEventArgs e)
{
try
{
var schedulesGroupsSubjects = (from schdules
in
AdminController.State.Session.Schedules
group schdules by schdules.DisplayPermitName);
int
count = schedulesGroupsSubjects.ToArray().Count();
for
(
int
i = 0; i < count; i++)
{
var schedulevar = schedulesGroupsSubjects.ToArray()[i].ToList<Schedule>();
IList<Schedule> schNew = schedulevar.ToList<Schedule>();
for
(
int
j = 0; j < schNew.Count; j++)
{
int
modInput = j % 2;
if
(e.Appointment.Subject.Trim() == schNew[j].DisplayPermitName.Trim())
{
if
(modInput == 0)
e.Appointment.CssClass =
"rsCategoryDarkBlue"
;
else
e.Appointment.CssClass =
"rsCategoryBlue"
;
}
}
}
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// RadScheduler1_AppointmentCreated
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
RadScheduler1_AppointmentCreated(
object
sender, AppointmentCreatedEventArgs e)
{
try
{
if
(e.Appointment.Visible && !IsAppointmentRegisteredForTooltip(e.Appointment))
{
string
id = e.Appointment.ID.ToString();
foreach
(
string
domElementID
in
e.Appointment.DomElements)
{
RadToolTipManager1.TargetControls.Add(domElementID, id,
true
);
}
}
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// IsAppointmentRegisteredForTooltip
/// </summary>
/// <param name="apt"></param>
/// <returns></returns>
private
bool
IsAppointmentRegisteredForTooltip(Appointment apt)
{
try
{
foreach
(ToolTipTargetControl targetControl
in
RadToolTipManager1.TargetControls)
{
if
(apt.DomElements.Contains(targetControl.TargetControlID))
{
return
true
;
}
}
return
false
;
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
/// <summary>
/// RadToolTipManager1_AjaxUpdate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected
void
RadToolTipManager1_AjaxUpdate(
object
sender, ToolTipUpdateEventArgs e)
{
try
{
this
.AdminController.State.Session.Schedule =
new
Schedule(userSession);
int
aptId =
int
.Parse(e.TargetControlID.Split(
'_'
)[3]);
Appointment apt = RadScheduler1.Appointments[aptId];
this
.AdminController.State.Session.Schedules =
this
.AdminController.RetrieveAllEventSchedules();
for
(
int
i = 0; i <
this
.AdminController.State.Session.Schedules.Count; i++)
{
if
((apt.Subject ==
this
.AdminController.State.Session.Schedules[i].DisplayPermitName) && apt.ID.ToString() ==
this
.AdminController.State.Session.Schedules[i].ID.ToString())
//&& (apt.Start.Equals(this.AdminController.State.Session.Schedules[i].EventStartDate)) && (apt.End.Equals(this.AdminController.State.Session.Schedules[i].EventEndDate)))
{
apt.Subject =
"<div class='AlignCenter'>"
+
"Permit Name : "
+
this
.AdminController.State.Session.Schedules[i].DisplayPermitName +
"<br>"
+
"Client Name : "
+
this
.AdminController.State.Session.Schedules[i].DisplayClientName +
"<br>"
+
"Facility Name : "
+
this
.AdminController.State.Session.Schedules[i].DisplayFacilityName +
"<br>"
+
"Resource Name : "
+
this
.AdminController.State.Session.Schedules[i].DisplayResourceName +
"</div>"
;
}
}
AppointmentToolTip toolTip = (AppointmentToolTip)LoadControl(
"~/UserControls/AppointmentToolTip.ascx"
);
toolTip.TargetAppointment = apt;
e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip);
aptId = 0;
}
catch
(SofturaException softuraException)
{
throw
softuraException;
}
catch
(Exception exception)
{
throw
exception;
}
}
#endregion
}
Thanks,
Janni
0
Hello Janni,
RadToolTipManager has its own ajax update mechanism which is triggered when the AjaxUpdate server event is raised. This conflicts with RadAjaxManager. The workaround is to use an UpdatePanel with UpdateMode="Conditional" as shown in this demo:
Greetings,
Peter
the Telerik team
RadToolTipManager has its own ajax update mechanism which is triggered when the AjaxUpdate server event is raised. This conflicts with RadAjaxManager. The workaround is to use an UpdatePanel with UpdateMode="Conditional" as shown in this demo:
<
asp:UpdatePanel
runat
=
"server"
ID
=
"UpdatePanel1"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
Width
=
"750px"
TimeZoneOffset
=
"03:00:00"
SelectedDate
=
"2007-03-30"
DayStartTime
=
"08:00:00"
DayEndTime
=
"18:00:00"
DataSourceID
=
"AppointmentsDataSource"
DataKeyField
=
"ID"
DataSubjectField
=
"Subject"
DataStartField
=
"Start"
DataEndField
=
"End"
DataRecurrenceField
=
"RecurrenceRule"
DataRecurrenceParentKeyField
=
"RecurrenceParentID"
DisplayDeleteConfirmation
=
"false"
SelectedView
=
"WeekView"
>
<
AdvancedForm
Modal
=
"true"
/>
<
TimelineView
UserSelectable
=
"false"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
</
telerik:RadScheduler
>
<
telerik:RadToolTipManager
runat
=
"server"
ID
=
"RadToolTipManager1"
Width
=
"320"
Height
=
"210"
Animation
=
"None"
HideEvent
=
"LeaveToolTip"
Text
=
"Loading..."
RelativeTo
=
"Element"
OnAjaxUpdate
=
"RadToolTipManager1_AjaxUpdate"
OnClientBeforeShow
=
"clientBeforeShow"
EnableShadow
=
"true"
/>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart 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
Janni
Top achievements
Rank 1
answered on 29 Nov 2010, 09:08 AM
Hi Peter,
That was a great job. It's working fine.
Thanks for your help.
And one more issue, if i shift from month to day view or some other view, the loading panel doesn't appear.
It's shifting from one view to another without showing the loading panel.
Can u please help me on this.
Thanks,
Janni.
That was a great job. It's working fine.
Thanks for your help.
And one more issue, if i shift from month to day view or some other view, the loading panel doesn't appear.
It's shifting from one view to another without showing the loading panel.
Can u please help me on this.
Thanks,
Janni.
0
Hi Janni,
In order to display RadAjaxLoadingPanel control during ajax request performed by a control wrapped in ASP:UpdatePanel, you will need to show it and hide it explicitly in a similar way as in this demo. However instead of handling the OnRequestStart and OnResponseEnd events of the RadAjaxManager, you will need to handle the corresponding pageRequestManager events.
Regards,
Iana
the Telerik team
In order to display RadAjaxLoadingPanel control during ajax request performed by a control wrapped in ASP:UpdatePanel, you will need to show it and hide it explicitly in a similar way as in this demo. However instead of handling the OnRequestStart and OnResponseEnd events of the RadAjaxManager, you will need to handle the corresponding pageRequestManager events.
Regards,
Iana
the Telerik team
Browse the vast support resources we have to jumpstart 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.