This is a migrated thread and some comments may be shown as answers.

Appointment Details doesn't shown fully

8 Answers 157 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Janni
Top achievements
Rank 1
Janni asked on 09 Sep 2010, 10:40 AM

Hi Team,

I've implemented the rad scheduler, where the data will be collect from the Db and binds to the calender.
I've done the bindings correctly, but in the month view the appointments details doesn't shown fully.
I've set the row height in the scheduler and the output looks good in the month view where in the day view it breaks.
Also i set padding to the appointment, but it overlaps.

I've pasted the aspx code below also
I've attached 2 output images.
where
1. withoutfulldetails.jpg - i didn't set row height to the scheduler, but the appointment details not shown fully.
2.withfulldetails.jpg - set row height to the scheduler, looks good in the month view, but in the day view it breaks.

my results needs to be - data must binds properly in day,week and month view fully and whenever i add more records in the DB, the row height of the calender date must be done automatically.

<telerik:RadScheduler runat=
"server" ID="RadScheduler1"Skin="Web20"           CustomAttributeNames="StartTime,EndTime,SessionDate,DisplayPermitName,EventStartDate,DisplayClientTypeVisibility,DisplayResourceVisibility,DisplayFacilityVisibility,EventEndDate,ID,DisplayPermitVisibility,DisplayFacilityName,DisplayResourceName,DisplayClientTypeName,Event_ID" SelectedDate="2010-08-10" DataStartField="EventStartDate" EnableDatePicker="true" GroupingDirection="Horizontal" MonthView-GroupingDirection="Horizontal"  
DataEndField="EventEndDate" DayStartTime="08:00:00" DayEndTime="23:00:00" ShowFullTime="true" RowHeight="60" SelectedView="DayView" DataKeyField="ID" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"           DataSubjectField="DisplayPermitName" EnableEmbeddedSkins="false" AllowDelete="false"AllowEdit="false" TimelineView-NumberOfSlots="4" AllowInsert="false" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound">
<AdvancedForm Modal="true" />
 <AppointmentTemplate>
                      
<asp:LinkButton runat="server" ID="lblDisplayPermitName"
 OnClick="RedirectToEventMaintenance"Style="font-weight: bold;" 
 CommandArgument='<%# Eval("Event_ID") + "~" + Eval("SessionDate") %>'
 Visible='<%# Convert.ToBoolean(Eval("DisplayPermitVisibility")) %>'>
 <%# Eval("DisplayPermitName")%>
</asp:LinkButton><br />
                    
<asp:Label runat="server" ID="labelStartTime" Visible="true">
   <%# Eval("StartTime")%>
</asp:Label>
 
<asp:Label runat="server" ID="labelEndTime" Text="- " Visible="true">
  <%# Eval("EndTime")%>
</asp:Label><br />
 
<asp:Label runat="server" ID="lblDisplayClientTypeName" Text="ClientType Name :"
  Visible='<%# Convert.ToBoolean(Eval("DisplayClientTypeVisibility")) %>'>
   <%# Eval("DisplayClientTypeName")%>
</asp:Label><br />
 
<asp:Label runat="server" ID="lblDisplayFacilityName" Text="Facility Type Name :"
  Visible='<%# Convert.ToBoolean(Eval("DisplayFacilityVisibility")) %>'>
  <%# Eval("DisplayFacilityName")%>
</asp:Label><br />
 
<asp:Label runat="server" ID="lblDisplayResourceName" Text="Resource Name :" 
  Visible='<%# Convert.ToBoolean(Eval("DisplayResourceVisibility")) %>'>
  <%# Eval("DisplayResourceName")%>
</asp:Label><br />
</AppointmentTemplate>
</telerik:RadScheduler>

Thanks,
Daniel.B

8 Answers, 1 is accepted

Sort by
0
Janni
Top achievements
Rank 1
answered on 13 Sep 2010, 06:32 AM
Hi,

Is anyone there to solve my problem??
It'll helpful for me, if you get me a solution.
Awaiting for the quick reply.

Thanks,
Daniel.B
0
Peter
Telerik team
answered on 13 Sep 2010, 12:02 PM
Hello Daniel,

For Month view you can use this kb article. However, for Day or Week view, the height of the appointment will be dependent on its duration, so I recommend you consider using RadToolTip to show any extra data.


Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Janni
Top achievements
Rank 1
answered on 13 Sep 2010, 12:31 PM
Hi Peter,

Thanks for your reply.
Your KB article is useful for me.
Having one more doubt.
I need to show the different color for the different appointments in the calender.
So I've seen one example like this
<ResourceStyles>
<telerik:ResourceStyleMapping Type="Calendar" Text="Development" ApplyCssClass="rsCategoryGreen" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />
<telerik:ResourceStyleMapping Type="Calendar" Text="Work" ApplyCssClass="rsCategoryOrange" /> </ResourceStyles>

as of here the appointment value is given directly in the text.
but in my project, I'm getting the appointment from the DB, so i cannot do this as of the above example.

So is there any solution?
Awaiting for your kind reply.

Thanks,
Daniel.B

0
Janni
Top achievements
Rank 1
answered on 14 Sep 2010, 05:12 AM
Hello Friends,

Can anyone solve my above requirements?
Awaiting for your quick reply.

Thanks,
Daniel.B
0
Janni
Top achievements
Rank 1
answered on 14 Sep 2010, 09:46 AM
anyone know the solution?
Pls share as quick as
0
Janni
Top achievements
Rank 1
answered on 14 Sep 2010, 01:10 PM
Hi Team,

I've tried for the above solution here.
I used LINQ and retrieve the same appointment group separately, and assign the color code to that particular appointment group.
Whenever i run the code, i can see the color code value by fixing the breaking point.
But it doesnt reflect in the UI.
Below is the code.
/// <summary>
/// RadScheduler1_AppointmentDataBound
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>

protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
{
var schedulesGroupsSubjects = (from schdules in AdminController.State.Session.Schedules                   
group schdules by schdules.DisplayPermitName);
 
int count = schedulesGroupsSubjects.ToArray().Count();  
for (int i = 0; i < count; i++)
 {
    string[] color = new string[count];
    color[i]=(new Random()).Next(0xffffff).ToString("x6");
    var schedulevar = schedulesGroupsSubjects.ToArray()[i].ToList<Schedule>();
    IList<Schedule> schNew = schedulevar.ToList<Schedule>();
               
    for (int j = 0; j < schNew.Count; j++)
     {
      if (e.Appointment.Subject == schNew[j].DisplayPermitName)
       e.Appointment.CssClass = color[i].ToString();                  
     }              
   }           
}

Can someone help and get me a solution?

Thanks,
Daniel.B
0
Peter
Telerik team
answered on 15 Sep 2010, 03:32 PM
Hi Janni,

Please, see this help topic:
http://www.telerik.com/help/aspnet-ajax/appearance-setting-appointment-style.html

Note that AppointmentDataBound is a server side event in which you can set e.Appointment.BackColor.


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Janni
Top achievements
Rank 1
answered on 16 Sep 2010, 06:17 AM
Hi Team,
 
Thanks for your reply.
I got the solution
 
 
protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
{
var schedulesGroupsSubjects = (from schdules in AdminController.State.Session.Schedules
group schdules by schdules.DisplayPermitName);
 
int count = schedulesGroupsSubjects.ToArray().Count();
 for (int i = 0; i < count; i++)
  {
string[] strColor = new string[]{"rsCategoryLightGoldenrodYellow","rsCategoryBlue", "rsCategoryDarkGreen", "rsCategoryGreen", "rsCategoryDarkRed","rsCategoryOrange", "rsCategoryPink", "rsCategoryRed", "rsCategoryViolet", "rsCategoryYellow"};
  
var schedulevar = schedulesGroupsSubjects.ToArray()[i].ToList<Schedule>();
IList<Schedule> schNew = schedulevar.ToList<Schedule>();
 
for (int j = 0; j < schNew.Count; j++)
  {
   if (e.Appointment.Subject == schNew[j].DisplayPermitName)
   e.Appointment.CssClass = strColor[i].ToString();
  }
 }
}
Thanks,
Daniel.B
Tags
Scheduler
Asked by
Janni
Top achievements
Rank 1
Answers by
Janni
Top achievements
Rank 1
Peter
Telerik team
Share this question
or