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

RadScheduler Alias for Attribute

2 Answers 101 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Marco Beyer
Top achievements
Rank 1
Marco Beyer asked on 21 Jun 2011, 07:56 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 23 Jun 2011, 02:08 PM
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.

0
Marco Beyer
Top achievements
Rank 1
answered on 23 Jun 2011, 02:35 PM
Hallo Plamen,

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

All the best,
Marco
Tags
Scheduler
Asked by
Marco Beyer
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Marco Beyer
Top achievements
Rank 1
Share this question
or