Dave Miller
Top achievements
Rank 2
Dave Miller
asked on 30 Oct 2008, 04:37 PM
Is it possible to control the number of appointments shown on a day. If you have it set to show 2 appointments in month view there is actually room for 3 as the space is there for the "Show More" link if there are 3 or more.
Is it possible to show 3 using the space the link would take and show the link with 4 or more?
Thanks,
Dave
Is it possible to show 3 using the space the link would take and show the link with 4 or more?
Thanks,
Dave
10 Answers, 1 is accepted
0
Hello Dave,
Please, try setting MonthView-VisibleAppointmentsPerDay="3". Also, you may find useful the kb article on:
How to show all appointments in Month View.
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please, try setting MonthView-VisibleAppointmentsPerDay="3". Also, you may find useful the kb article on:
How to show all appointments in Month View.
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dave Miller
Top achievements
Rank 2
answered on 31 Oct 2008, 12:51 PM
Peter,
What I was looking for was a way to check each day and if there were 3 or less show them and if there were more than three show to with the "Show More" link so if there were more than 3 in one day it would just show 2 and the link and not create the extra space, for the link, below the ones with 3 or less.
I guess what I am looking for is a way to control the VisibleAppointmentsPerDay on databound for a day by day basis depending on the number of appointments on that day.
Thank,
Dave
What I was looking for was a way to check each day and if there were 3 or less show them and if there were more than three show to with the "Show More" link so if there were more than 3 in one day it would just show 2 and the link and not create the extra space, for the link, below the ones with 3 or less.
I guess what I am looking for is a way to control the VisibleAppointmentsPerDay on databound for a day by day basis depending on the number of appointments on that day.
Thank,
Dave
0
Hi Dave,
There should be always one extra space under the apponintments, no matter how many you set them to be visible in month view. This is by design and it is intended to allow users to insert additional appointments if needed by double-clicking on the extra space.
If you want to control the number of visible appointments on a day by day basis, I think the kb article on How to show all appointments in Month View should help you achieve this. Have you had a chance to test the approach there? How is the functionality achieved via this kb article different from what you are need? Please, eleaborate and we will try to find a solution for you.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
There should be always one extra space under the apponintments, no matter how many you set them to be visible in month view. This is by design and it is intended to allow users to insert additional appointments if needed by double-clicking on the extra space.
If you want to control the number of visible appointments on a day by day basis, I think the kb article on How to show all appointments in Month View should help you achieve this. Have you had a chance to test the approach there? How is the functionality achieved via this kb article different from what you are need? Please, eleaborate and we will try to find a solution for you.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hi Dave,
There should be always one extra space under the apponintments, no matter how many you set them to be visible in month view. This is by design and it is intended to allow users to insert additional appointments if needed by double-clicking on the extra space.
If you want to control the number of visible appointments on a day by day basis, I think the kb article on How to show all appointments in Month View should help you achieve this. Have you had a chance to test the approach there? How is the functionality achieved via this kb article different from what you are need? Please, eleaborate and we will try to find a solution for you.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
There should be always one extra space under the apponintments, no matter how many you set them to be visible in month view. This is by design and it is intended to allow users to insert additional appointments if needed by double-clicking on the extra space.
If you want to control the number of visible appointments on a day by day basis, I think the kb article on How to show all appointments in Month View should help you achieve this. Have you had a chance to test the approach there? How is the functionality achieved via this kb article different from what you are need? Please, eleaborate and we will try to find a solution for you.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ted
Top achievements
Rank 1
answered on 12 Nov 2008, 01:10 AM
The link How to show all appointments in Month View appears to be broken. Can you tell me where to find this knowledge base article?
Thanks
Thanks
0
Hi Ted,
The KB is available again now. Sorry for the inconvenience.
Kind regards,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The KB is available again now. Sorry for the inconvenience.
Kind regards,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ted
Top achievements
Rank 1
answered on 13 Nov 2008, 03:14 PM
Tsvetomir,
I downloaded the sample code for the Kb article How to show all appointments in Month View and attempted to run iit using RadControls for ASP.Net AJAX Q3 2008. I get the exception "HttpException was unhandled by user code": Data properties on data control 'RadScheduler1' such as DataSource, DataSourceID, and DataMember cannot be changed during the databinding phase of the control. This occurs in the method below for the statement "RadScheduler1.MonthView.VisibleAppointmentsPerDay = MaxCount[AppMonth - 1];"
I downloaded the sample code for the Kb article How to show all appointments in Month View and attempted to run iit using RadControls for ASP.Net AJAX Q3 2008. I get the exception "HttpException was unhandled by user code": Data properties on data control 'RadScheduler1' such as DataSource, DataSourceID, and DataMember cannot be changed during the databinding phase of the control. This occurs in the method below for the statement "RadScheduler1.MonthView.VisibleAppointmentsPerDay = MaxCount[AppMonth - 1];"
protected void RadScheduler1_DataBound(object sender, Eventers e)
{
//the MonthVisibleAppointmentsPerDay to MaxCount for each month.
int AppMonth = RadScheduler1.SelectedDate.Month;
RadScheduler1.MonthView.VisibleAppointmentsPerDay = MaxCount[AppMonth - 1];
}
Can you please advise on what I need to do in order to be able to display all the appointments on a given day without the Show More link and have the row sized by the maximum number of appointments for that week.
Thanks,
Ted
0
Hi Ted,
This is strange. The code fragment is from the old version of the KB article. You might be looking at a cached version. This is the updated code:
And the needed CSS selectors:
Let us know if you still have problems viewing the KB.
Kind regards,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This is strange. The code fragment is from the old version of the KB article. You might be looking at a cached version. This is the updated code:
protected override void OnPreRender(EventArgs e) |
{ |
if (RadScheduler1.SelectedView == SchedulerViewType.MonthView) |
{ |
RadScheduler1.DataBind(); |
int maxAppointmentsPerDay = 2; |
DateTime currentDay = RadScheduler1.VisibleRangeStart; |
while (currentDay < RadScheduler1.VisibleRangeEnd) |
{ |
DateTime nextDay = currentDay.AddDays(1); |
IList<Appointment> visibleAppointments = RadScheduler1.Appointments.GetAppointmentsInRange(currentDay, nextDay); |
maxAppointmentsPerDay = Math.Max(maxAppointmentsPerDay, visibleAppointments.Count); |
currentDay = nextDay; |
} |
RadScheduler1.MonthView.VisibleAppointmentsPerDay = maxAppointmentsPerDay; |
} |
base.OnPreRender(e); |
} |
And the needed CSS selectors:
<style type="text/css"> |
div.RadScheduler .rsMonthView .rsWrap |
{ |
height: auto; |
font-size: 0; |
min-height: 10px; /* * 4 = empty cell height */ |
line-height:10px; |
} |
div.RadScheduler .rsMonthView .rsDateWrap, |
div.RadScheduler .rsWrap div.rsApt, |
div.RadScheduler .rsRow div.rsShowMore |
{ |
position: relative; |
font: 11px/16px verdana,sans-serif; |
} |
</style> |
Let us know if you still have problems viewing the KB.
Kind regards,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ted
Top achievements
Rank 1
answered on 14 Nov 2008, 03:40 PM
Tsvetomir,
The code fragment and css in your reply works great. The project (zip) file with the KB article is where I got the code from my last post. I think that project file needs to be updated.
Thanks,
Ted
The code fragment and css in your reply works great. The project (zip) file with the KB article is where I got the code from my last post. I think that project file needs to be updated.
Thanks,
Ted
0
Hello Ted,
Thanks for your observation. The sample project should be updated now.
All the best,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks for your observation. The sample project should be updated now.
All the best,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.