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

Custom Attributes

1 Answer 81 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rhys
Top achievements
Rank 1
Rhys asked on 08 Sep 2008, 09:40 PM
Hi,

When using custom attributes with the RADScheduler in the Advanced Edit/Insert form the attribute is displayed in a text box by default.  Is there a way to control the properties of the text box control in code-behind without using a custom advanced form?  I want to make the text box larger.

<telerik:RadScheduler ID="RadScheduler1" runat="server"

CustomAttributeNames="Format" DataEndField="End" DataKeyField="ID"

DataRecurrenceField="RecurrenceRule"

DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="SqlDataSource1"

DataStartField="Start" DataSubjectField="Subject"

EnableCustomAttributeEditing="True">



1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Sep 2008, 09:03 AM
Hi Rhys,

Yes, this is possible. Please, try the following:

 protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e)  
    {  
        if ((e.Container.Mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert))  
        {             
            TextBox formatTextBox = (TextBox)e.Container.FindControl("AttrFormat");  
            formatTextBox.Width = Unit.Pixel(300);  
            formatTextBox.BackColor = System.Drawing.Color.Red;  
        }  
    } 


Regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Rhys
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or