7 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 31 Jan 2013, 09:36 AM
Hi Raju
The MonthView-VisibleAppointmentsPerDay property itself determines the number of appointments a cell in Month view can display and then if the number of appointments for a day exceeds this limit, the cell displays a link labeled "more..."
Then set MonthView-AdaptiveRowHeight to "true" to allow independent row height.
Thanks
Princy
The MonthView-VisibleAppointmentsPerDay property itself determines the number of appointments a cell in Month view can display and then if the number of appointments for a day exceeds this limit, the cell displays a link labeled "more..."
Then set MonthView-AdaptiveRowHeight to "true" to allow independent row height.
Thanks
Princy
0

Raju
Top achievements
Rank 1
answered on 31 Jan 2013, 09:53 AM
Hi Princy,
I want to show the custom message like
if there are 7 appointments in a cell. And i set MonthView-VisibleAppointmentsPerDay=4. Then the message should be "3 more".
For this i used the below code.
it is showing as per my requirement. But the problem is same message for all cells which have extra appointments more than 4. It is taking last cell count which is having extra appointments more than 4.
Example:
cell 1 having 7 appointments
cell 3 having 6 appointments
then it is showing "2 more" message for both cells.
Thanks
Raju
I want to show the custom message like
if there are 7 appointments in a cell. And i set MonthView-VisibleAppointmentsPerDay=4. Then the message should be "3 more".
For this i used the below code.
protected
void
radSchedulerAssignments_TimeSlotCreated(
object
sender, TimeSlotCreatedEventArgs e)
{
if
(e.TimeSlot.Appointments.Count > 4)
{
int
temp = e.TimeSlot.Appointments.Count - 4;
//radTeacherSchedulerAssignments.Localization.ShowMore = "+ " + temp + " more ...";
radTeacherSchedulerAssignments.Appointments[Convert.ToInt32(e.TimeSlot.Index)].Owner.Localization.ShowMore =
"+ "
+ temp +
" more ..."
;
radTeacherSchedulerAssignments.Appointments[Convert.ToInt32(e.TimeSlot.Index)].Owner.MonthView.VisibleAppointmentsPerDay = 4;
UPSchedulerAssigns.Update();
}
}
it is showing as per my requirement. But the problem is same message for all cells which have extra appointments more than 4. It is taking last cell count which is having extra appointments more than 4.
Example:
cell 1 having 7 appointments
cell 3 having 6 appointments
then it is showing "2 more" message for both cells.
Thanks
Raju
0

Raju
Top achievements
Rank 1
answered on 01 Feb 2013, 05:11 AM
Hi Princy, Please address my issue....
0

Raju
Top achievements
Rank 1
answered on 04 Feb 2013, 09:40 AM
Hello telerik team...
Can you please resolve my issue.
regards
Raju
Can you please resolve my issue.
regards
Raju
0
Hi Raju,
Hope this will be helpful.
All the best,
Plamen
the Telerik team
Here is one way to achieve such functionality:
protected
void
RadScheduler1_TimeSlotCreated(
object
sender, TimeSlotCreatedEventArgs e)
{
RadScheduler scheduler = (RadScheduler)sender;
if
(scheduler.SelectedView==SchedulerViewType.MonthView)
{
if
(e.TimeSlot.Appointments.Count>0)
//count of visible appointments
{
int
visibleAppointments = RadScheduler1.MonthView.VisibleAppointmentsPerDay;
int
realCountOfAppointments= scheduler.Appointments.GetAppointmentsInRange(e.TimeSlot.Start, e.TimeSlot.End).Count;
//count of all appointments in the timespan
if
(realCountOfAppointments - visibleAppointments>0)
{
e.TimeSlot.CssClass = (realCountOfAppointments - visibleAppointments) +
"moreAppointments"
;
}
}
}
<script type=
"text/javascript"
>
function
pageLoad() {
var
$ = $telerik.$;
$(
"[class$='moreAppointments']"
).each(
function
(index,elem){
$(
this
).find(
".rsShowMore"
).text($(
this
).attr(
"class"
).substring(0, $(
this
).attr(
"class"
).indexOf(
"moreAppointments"
)) +
" more"
);
});
}
Hope this will be helpful.
All the best,
Plamen
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

Raju
Top achievements
Rank 1
answered on 04 Feb 2013, 12:41 PM
Hi Plamen,
I have tried the code given, but not able to achieve the desired functionality.
Thanks
Raju K
I have tried the code given, but not able to achieve the desired functionality.
Thanks
Raju K
0
Hi Raju,
Plamen
the Telerik team
I am attaching my test Web Page where the test of the more button was changed accordingly.
Hope this will be more helpful.
Plamen
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.