Hi,
I have a scheduler which displays a single day, when I add an appoinment and resize it out side the view of the scheduler the scroll bar does not move with the resizing of the appointment. I would like to achive the same as the outlool calendar.
This is the scheduler in my app:
http://screencast.com/t/gaDDR5TWqx
This is out look
http://screencast.com/t/zYgGuzwu1y
Is this possible?
Thanks
I have a scheduler which displays a single day, when I add an appoinment and resize it out side the view of the scheduler the scroll bar does not move with the resizing of the appointment. I would like to achive the same as the outlool calendar.
This is the scheduler in my app:
http://screencast.com/t/gaDDR5TWqx
This is out look
http://screencast.com/t/zYgGuzwu1y
Is this possible?
Thanks
6 Answers, 1 is accepted
0
Hello Karl,
Thank you for contacting us.
Yes, it is possible to achieve this. In order to do so, you need to handle the MouseMove event of RadScheduler as it is shown below:
As supporting such functionality out of the box seems very reasonable, I have logged this as a feature request in our Public Issue Tracking System. Here you can find the PITS entry. Your Telerik points have been updated for this request.
Do not hesitate to contact us whenever you have any future questions regarding our products.
Kind regards,
Ivan Todorov
the Telerik team
Thank you for contacting us.
Yes, it is possible to achieve this. In order to do so, you need to handle the MouseMove event of RadScheduler as it is shown below:
private
void
radScheduler1_MouseMove(
object
sender, MouseEventArgs e)
{
SchedulerDayViewElement viewElement = (
this
.radScheduler1.SchedulerElement.ViewElement
as
SchedulerDayViewElement);
if
(viewElement ==
null
)
return
;
DayViewAppointmentsTable table = viewElement.DataAreaElement.Table;
if
(
this
.radScheduler1.SchedulerElement.ResizeBehavior.IsResizing &&
e.Y >
this
.radScheduler1.Height)
{
table.Scroll(
false
);
}
else
if
(
this
.radScheduler1.SchedulerElement.ResizeBehavior.IsResizing &&
e.Y < viewElement.AllDayHeaderElement.ControlBoundingRectangle.Bottom)
{
table.Scroll(
true
);
}
}
As supporting such functionality out of the box seems very reasonable, I have logged this as a feature request in our Public Issue Tracking System. Here you can find the PITS entry. Your Telerik points have been updated for this request.
Do not hesitate to contact us whenever you have any future questions regarding our products.
Kind regards,
Ivan Todorov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Karl
Top achievements
Rank 1
answered on 11 Apr 2012, 05:15 PM
Thanks
0
Peter
Top achievements
Rank 1
answered on 18 Sep 2012, 03:26 PM
Hello Ivan,
I have a Scheduler in week or dayview and I want to add an appointment by selecting the time for it. When I reach an area out side the view of the scheduler the scroll bar does not move with the selection. I would like to achieve a similiar behaviour as with the resizing of the appointment shown above.
I've found such behaviour for example in the google calender.
Could you provide me a short code snipped?
Thank you in advance,
Peter
I have a Scheduler in week or dayview and I want to add an appointment by selecting the time for it. When I reach an area out side the view of the scheduler the scroll bar does not move with the selection. I would like to achieve a similiar behaviour as with the resizing of the appointment shown above.
I've found such behaviour for example in the google calender.
Could you provide me a short code snipped?
Thank you in advance,
Peter
0
Hi Peter,
This functionality can be achieved using a similar approach. The following code snippet demonstrates this:
I hope you find this useful. Feel free to ask if you have additional questions.
All the best,
Ivan Todorov
the Telerik team
This functionality can be achieved using a similar approach. The following code snippet demonstrates this:
public
Form1()
{
InitializeComponent();
this
.radScheduler1.MouseMove +=
new
MouseEventHandler(radScheduler1_MouseMove);
this
.radScheduler1.MouseDown +=
new
MouseEventHandler(radScheduler1_MouseDown);
this
.radScheduler1.MouseUp +=
new
MouseEventHandler(radScheduler1_MouseUp);
}
void
radScheduler1_MouseUp(
object
sender, MouseEventArgs e)
{
this
.radScheduler1.Capture =
false
;
}
void
radScheduler1_MouseDown(
object
sender, MouseEventArgs e)
{
if
(
this
.radScheduler1.ElementTree.GetElementAtPoint(e.Location)
is
SchedulerCellElement)
{
this
.radScheduler1.Capture =
true
;
}
}
void
radScheduler1_MouseMove(
object
sender, MouseEventArgs e)
{
if
(
this
.radScheduler1.DragDropBehavior.IsDragging || e.Button != System.Windows.Forms.MouseButtons.Left)
{
return
;
}
DayViewAppointmentsArea appointmentArea = (
this
.radScheduler1.SchedulerElement.ViewElement
as
SchedulerDayViewElement).DataAreaElement;
Rectangle tableRectangle = appointmentArea.ControlBoundingRectangle;
if
(!tableRectangle.Contains(e.Location))
{
if
(e.Y > tableRectangle.Bottom)
{
appointmentArea.Table.Scroll(
false
);
}
else
if
(e.Y < tableRectangle.Top)
{
appointmentArea.Table.Scroll(
true
);
}
}
}
I hope you find this useful. Feel free to ask if you have additional questions.
All the best,
Ivan Todorov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Peter
Top achievements
Rank 1
answered on 27 Sep 2012, 06:05 AM
Hi Ivan,
thank you very much for the solution. It works fine for me. A short remark: I can't use
in Telerik WinForms v. 2012.2.912.40 because there is no such method.
Best regards,
Peter
thank you very much for the solution. It works fine for me. A short remark: I can't use
this.radScheduler1.DragDropBehavior
in Telerik WinForms v. 2012.2.912.40 because there is no such method.
Best regards,
Peter
0
Hi Peter,
Yes, in the version you are using you should access the DragDropBehavior as shown below:
As of the next official release, the DragDropBehavior will be available directly on the control.
Feel free to ask if you have any additional questions.
Kind regards,
Ivan Todorov
the Telerik team
Yes, in the version you are using you should access the DragDropBehavior as shown below:
this
.radScheduler1.SchedulerElement.DragDropBehavior
As of the next official release, the DragDropBehavior will be available directly on the control.
Feel free to ask if you have any additional questions.
Kind regards,
Ivan Todorov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>