Restrict Day view
Hi! All
I need to avoid showing day view when single day is click on schedule calendar. Is there anyway to achieve this ?
thanks in advance..
I need to avoid showing day view when single day is click on schedule calendar. Is there anyway to achieve this ?
thanks in advance..
SIGN IN To post a reply.
2 Replies
AN
Anonymous
March 15, 2008 01:57 PM UTC
There is currently no event or property exposed that would allow you to get the described behavior.
But with a little work, you can probably do what you want. The Navigation calendar that you see on the ScheduleControl is actually an embedded panel (a NavigationCalendar object) that holds a grid (a GridControl object). To ignore that cell click that changes to the Day View, you can override the GridControl.OnCellClick. To get at this GridControl, you have to also derive the ScheduleControl and the NavigationCalendar as shown here.
Here is a sample showing the click not changing into the day view.
CS_MDBsupportDerivedClasses.zip
But with a little work, you can probably do what you want. The Navigation calendar that you see on the ScheduleControl is actually an embedded panel (a NavigationCalendar object) that holds a grid (a GridControl object). To ignore that cell click that changes to the Day View, you can override the GridControl.OnCellClick. To get at this GridControl, you have to also derive the ScheduleControl and the NavigationCalendar as shown here.
public class MyScheduleControl : ScheduleControl
{
public override NavigationCalendar CreateNavigationCalendar()
{
return new MyNavigationCalendar();
}
}
public class MyNavigationCalendar : NavigationCalendar
{
public override GridControl CreateCalendarGrid()
{
return new MyCalendarGrid();
}
}
public class MyCalendarGrid : GridControl
{
protected override void OnCellClick(GridCellClickEventArgs e)
{
//ignore the click
//base.OnCellClick(e);
}
}
Here is a sample showing the click not changing into the day view.
CS_MDBsupportDerivedClasses.zip
SU
Sumeda
March 17, 2008 05:48 AM UTC
Thank you very much again.
>There is currently no event or property exposed that would allow you to get the described behavior.
But with a little work, you can probably do what you want. The Navigation calendar that you see on the ScheduleControl is actually an embedded panel (a NavigationCalendar object) that holds a grid (a GridControl object). To ignore that cell click that changes to the Day View, you can override the GridControl.OnCellClick. To get at this GridControl, you have to also derive the ScheduleControl and the NavigationCalendar as shown here.
Here is a sample showing the click not changing into the day view.
CS_MDBsupportDerivedClasses.zip
>There is currently no event or property exposed that would allow you to get the described behavior.
But with a little work, you can probably do what you want. The Navigation calendar that you see on the ScheduleControl is actually an embedded panel (a NavigationCalendar object) that holds a grid (a GridControl object). To ignore that cell click that changes to the Day View, you can override the GridControl.OnCellClick. To get at this GridControl, you have to also derive the ScheduleControl and the NavigationCalendar as shown here.
public class MyScheduleControl : ScheduleControl
{
public override NavigationCalendar CreateNavigationCalendar()
{
return new MyNavigationCalendar();
}
}
public class MyNavigationCalendar : NavigationCalendar
{
public override GridControl CreateCalendarGrid()
{
return new MyCalendarGrid();
}
}
public class MyCalendarGrid : GridControl
{
protected override void OnCellClick(GridCellClickEventArgs e)
{
//ignore the click
//base.OnCellClick(e);
}
}
Here is a sample showing the click not changing into the day view.
CS_MDBsupportDerivedClasses.zip
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
SU Sumeda
- Mar 15, 2008 07:21 AM UTC
- Mar 17, 2008 05:48 AM UTC