Hello,
I have a problem regarding the scheduler. I have bind the break data using in calender(see the attachment file which content data of break or block). In weekly view, i want to delete particular date from the calender. I used the (e.Appointment.Start.Date) or RadScheduler1.SelectedDate to find the date. It is not delete the selected break or block date.
But no problem in day view. It is delete the selected date. But the problem in weekly view. In weekly view, RadScheduler1.SelectedDate not work because it only delete the today date.
Please help me as soon as possible
Thanks
Jiten Mutum
I have a problem regarding the scheduler. I have bind the break data using in calender(see the attachment file which content data of break or block). In weekly view, i want to delete particular date from the calender. I used the (e.Appointment.Start.Date) or RadScheduler1.SelectedDate to find the date. It is not delete the selected break or block date.
But no problem in day view. It is delete the selected date. But the problem in weekly view. In weekly view, RadScheduler1.SelectedDate not work because it only delete the today date.
Please help me as soon as possible
Thanks
Jiten Mutum
5 Answers, 1 is accepted
0
Hi Jiten,
Plamen Zdravkov
the Telerik team
It seems that the image is not attached correctly.
You can refer to the Setting Special days or time slots in RadScheduler KB article that describes similar functionality.
Hope this will be helpful.
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jiten
Top achievements
Rank 1
answered on 29 Feb 2012, 06:17 AM
Hello Plamen Zdravkov,
I only Click on the Break or Block time slot in the calender and want to delete from the calender.
You are talking about different way. I only want to delete the Break time slot that all.
You can see the different date in the table(Attachment File). But when I click on the particular date in the weekly view it is not delete the selected date. That is the problem but day view has no problem.
And I used this event:
protected void RadScheduler1_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
{
if (e.MenuItem.Value == "Delete")
{
//First Way
DateTime todayDate = e.Appointment.Start.Date;
//Second Way
DateTime todayDate = RadScheduler1.SelectedDate;
string date = todayDate.ToShortDateString();
}
}
I want the selected date.
And In aspx page, added menu for delete:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Delete" Value="Delete" />
</Items>
</telerik:RadSchedulerContextMenu>
I attach a new image file regarding this problem. Please see.
And help as soon as possible.
Thanks
Jiten
I only Click on the Break or Block time slot in the calender and want to delete from the calender.
You are talking about different way. I only want to delete the Break time slot that all.
You can see the different date in the table(Attachment File). But when I click on the particular date in the weekly view it is not delete the selected date. That is the problem but day view has no problem.
And I used this event:
protected void RadScheduler1_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
{
if (e.MenuItem.Value == "Delete")
{
//First Way
DateTime todayDate = e.Appointment.Start.Date;
//Second Way
DateTime todayDate = RadScheduler1.SelectedDate;
string date = todayDate.ToShortDateString();
}
}
I want the selected date.
And In aspx page, added menu for delete:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Delete" Value="Delete" />
</Items>
</telerik:RadSchedulerContextMenu>
I attach a new image file regarding this problem. Please see.
And help as soon as possible.
Thanks
Jiten
0
Hello Jiten,
Plamen Zdravkov
the Telerik team
I have tested the behavior at our online demo, but could not observe any unusual behavior. You can see a video as part of our local tests.
If your scenario is somehow different, please try to explain how to reproduce it step by step.
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jiten
Top achievements
Rank 1
answered on 06 Mar 2012, 06:36 AM
Hello Plamen Zdravkov,
I see your video, but you are displaying the different appointment which can delete in our server database also.
But the break time slot is different from the appointment time slot. Please create one month break time for particular doctor, so it will display particular time slot (example 4 pm to 5 pm) and display for that month.
And that break or Block data come from database and that data can see attachment which I already attached.
And ID of that Break or Block is same and one row in the table for that break.
For displaying in the calender I created cursor to display that break or block for month.
And I used this event:
protected void RadScheduler1_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
{
if (e.MenuItem.Value == "Delete")
{
//First Way
DateTime todayDate = e.Appointment.Start.Date;(This is getting selected date from the weekly view, it getting the today date)
//Second Way
DateTime todayDate = RadScheduler1.SelectedDate;(This is getting selected date from the weekly view, it getting the today date)
string date = todayDate.ToShortDateString();
}
}
I want the selected date.
And In aspx page, added menu for delete:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Delete" Value="Delete" />
</Items>
</telerik:RadSchedulerContextMenu>
I give the above information in details.
I think you can understand what I want to tell you.
Thanks
Jiten
I see your video, but you are displaying the different appointment which can delete in our server database also.
But the break time slot is different from the appointment time slot. Please create one month break time for particular doctor, so it will display particular time slot (example 4 pm to 5 pm) and display for that month.
And that break or Block data come from database and that data can see attachment which I already attached.
And ID of that Break or Block is same and one row in the table for that break.
For displaying in the calender I created cursor to display that break or block for month.
And I used this event:
protected void RadScheduler1_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
{
if (e.MenuItem.Value == "Delete")
{
//First Way
DateTime todayDate = e.Appointment.Start.Date;(This is getting selected date from the weekly view, it getting the today date)
//Second Way
DateTime todayDate = RadScheduler1.SelectedDate;(This is getting selected date from the weekly view, it getting the today date)
string date = todayDate.ToShortDateString();
}
}
I want the selected date.
And In aspx page, added menu for delete:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Delete" Value="Delete" />
</Items>
</telerik:RadSchedulerContextMenu>
I give the above information in details.
I think you can understand what I want to tell you.
Thanks
Jiten
0
Hi Jiteni,
Hope this will be helpful.
Kind regards,
Plamen Zdravkov
the Telerik team
Here is one way how you can get the first day of the selected week and the last day of the selected week when you click the context menu of the appointment:
protected
void
RadScheduler1_AppointmentContextMenuItemClicked(
object
sender, AppointmentContextMenuItemClickedEventArgs e)
{
DateTime todayDate = e.Appointment.Start.Date;
//(This is getting selected date from the weekly view, it getting the today date)
DateTime lastDayoftheSelectedweek = selectedTime.AddDays(6);
}
DateTime selectedTime =
new
DateTime();
int
counter = 0;
protected
void
RadScheduler1_TimeSlotCreated(
object
sender, TimeSlotCreatedEventArgs e)
if
(RadScheduler1.SelectedView==SchedulerViewType.WeekView)
{
if
(counter==0)
{
selectedTime = e.TimeSlot.Start.Date.AddDays(1);
counter++;
}
}
}
Hope this will be helpful.
Kind regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.