Line Break in appointment description Textarea

2 posts, 0 answers
  1. Edward
    Edward avatar
    1 posts
    Member since:
    Jul 2011

    Posted 03 Aug 2011 Link to this post

    I'm trying to concatenate strings (table fields) via SQL SELECT statement and use the values in the

    DataDescriptionField

     

    of RadSchduler (TEXTAREA).  However, I want to create line breaks between the field values.

    SELECT 'Field 1: ' + field1 + ' \r\n ' + 'Field 2: ' +  field2 AS ConcatString
    FROM Table1

    I want the appointment description (textarea) to display...

    Field 1:  Field1 Value
    Field 2:  Field2 Value

    What do I use to create this?  The "\r\n" didn't work.  It displays as (literal) string.  

    I am trying to populate the Description textarea on an appointment using Telerik's RadScheduler.

    <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="1000px" Height="750px" SelectedDate="2011-08-01"
    DayStartTime="00:00:00" DayEndTime="23:59:59" TimeZoneOffset="00:00:00" DataSourceID="SurgeryDataSource2"
    DataKeyField="surID" DataDescriptionField="ConcatString" DataSubjectField="specialtyType" DataStartField="start_date" DataEndField="end_date">

    Thanks.

    Edward

     

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 04 Aug 2011 Link to this post

    Hello Edward,

    You can delimit your field values for example with '-'. Then you can try the following:
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
       {
           e.Appointment.Description = e.Appointment.Description.Replace("-", "\r\n");
       }

    This worked as expected at my end, but please let me know if you still experience problems.

    Regards,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top