RadScheduler Alias for Attribute

3 posts, 1 answers
  1. Marco Beyer
    Marco Beyer avatar
    25 posts
    Member since:
    Jun 2009

    Posted 21 Jun 2011 Link to this post

    Dear Telerik Staff,

    lets say, in my database, I have a field / colum called "Location" in order to store the location of an appointment as simple text.

    I know that I can add an attribute to the advanced edit form of the scheduler - in this case "Location". Then, RadScheduler creates a simple Textbox field in order to store the information about the location of an appointment as text.

    That is what I needed. But RadScheduler names the label besides the textbox exactly like the field, it is bound to. Is there a way to replace the default label, so I can add an alias for a attribute, I have added, for example "Ort" (German) or "Where the appointment takes place"??
     
    Would be happy to hear from you, soon.

    Best regards,
    Marco
  2. Answer
    Plamen
    Admin
    Plamen avatar
    2960 posts

    Posted 23 Jun 2011 Link to this post

    Hello Marco Beyer,

    Please take a look at our Custom Attributes demo where you can set the Label name with a simple change in the FormCreated event:
    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
            {
                // Disable the LastModified textbox in the advanced form
                if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert)
                {
                    RadTextBox txtModifiedTimeStamp = e.Container.FindControl("AttrLastModified") as RadTextBox;
                    if (txtModifiedTimeStamp != null)
                    {
                        txtModifiedTimeStamp.Enabled = false;
                    }
                    txtModifiedTimeStamp.Label = "Ort";
                }
            }

    Please note that the ID of the Custom Attribute controls is formed by the "Attr" keyword and the Name of the custom attribute - in your case will be "AttrLocation".

    Hope this helps.

    All the best,
    Plamen Zdravkov
    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.

  3. Marco Beyer
    Marco Beyer avatar
    25 posts
    Member since:
    Jun 2009

    Posted 23 Jun 2011 Link to this post

    Hallo Plamen,

    have many thanks for your solution! That was exactly what I was looking for! You made my day :-)

    All the best,
    Marco
Back to Top