How to add font awesome icon in appointment subject in Radscheduler

3 posts, 0 answers
  1. Qasim
    Qasim avatar
    5 posts
    Member since:
    Jan 2014

    Posted 26 May 2014 Link to this post



    How to add font awesome icon in appointment subject without losing the existing (default) style.
    My Radscheduler is binded with Dataset code is below.

    --------------------------aspx------------------------------------------
    <telerik:RadScheduler OnClientAppointmentClick="OnClientAppointmentClick" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" CustomAttributeNames="SiteId,UserId" ReadOnly="true" runat="server" ID="RadScheduler1" SelectedView="MonthView" OverflowBehavior="Auto">                    
                        </telerik:RadScheduler>
    -------------------------aspx.cs---------------------------------------
    RadScheduler1.DataSource = ds;//Dataset
    RadScheduler1.DataKeyField = "ScheduleID";
    RadScheduler1.DataStartField = "ScheduleDate";
    RadScheduler1.DataEndField = "ScheduleDate";
    RadScheduler1.DataSubjectField = "Name";// at this stage I want add awesome font if CustomAttributeNames    UserId is not null. this field also available in ds
    RadScheduler1.DataBind();

    protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
    {
    DataRowView row = (DataRowView)e.Appointment.DataItem;
    e.Appointment.Attributes.Add("SiteId", row["SiteId"].ToString());
    e.Appointment.Attributes.Add("UserId", row["UserId"].ToString());
    }
  2. Qasim
    Qasim avatar
    5 posts
    Member since:
    Jan 2014

    Posted 26 May 2014 Link to this post

    CORRECTION to above code....


    How to add font awesome icon in appointment subject without losing the existing (default) style.
    My Radscheduler is binded with Dataset code is below.

    --------------------------aspx------------------------------------------
    < telerik:RadScheduler OnClientAppointmentClick="OnClientAppointmentClick" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" CustomAttributeNames="SiteId,UserId" ReadOnly="true" runat="server" ID="RadScheduler1" SelectedView="MonthView" OverflowBehavior="Auto">                    
                        </telerik:RadScheduler>
    -------------------------aspx.cs---------------------------------------
    RadScheduler1.DataSource = ds;//Dataset
    RadScheduler1.DataKeyField = "ScheduleID";
    RadScheduler1.DataStartField = "ScheduleDate";
    RadScheduler1.DataEndField = "ScheduleDate";
    RadScheduler1.DataSubjectField = "Name";// at this stage I want add awesome font if CustomAttributeNames    UserId is not null. this field also available in ds
    RadScheduler1.DataBind();

    protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
    {
    DataRowView row = (DataRowView)e.Appointment.DataItem;
    e.Appointment.Attributes.Add("SiteId", row["SiteId"].ToString());
    e.Appointment.Attributes.Add("UserId", row["UserId"].ToString());
    if(!string.IsNullOrEmpty(row["UserId"].ToString()))
    e.Appointment.Subject = "<i class='fa fa-user'></i>" + e.Appointment.Subject;
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 28 May 2014 Link to this post

    Hello,

    Using the appointment templates would be possible solution if you want to add an icon or image in the appointment container. Here you can find a demo that demonstrates how to use the appointment templates in real scenario.

    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top