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

[Solved] Using CustomAttributeControl for Scheduler

1 Answer 125 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Swapnil Baokar
Top achievements
Rank 1
Swapnil Baokar asked on 28 Apr 2008, 02:45 PM
Hi,

I want to use a combobox and radio buttons to display and select custom attributes in the Scheduler Advanced Edit form. I want to fill the combo box with values depending upong the selection of the radio buttons.

Any ideas / examples on how to go about this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 30 Apr 2008, 03:54 PM
Hi Swapnil,

You can use AdvancedInsertTemplate and AdvancedEditTemplate forms as in the Templates online example obviously, but the trick is how to find the combobox in the event handler of the the radio button. Well, it is not that complex actually. Please, consider the following example:

<AdvancedInsertTemplate> 
    <asp:RadioButton ID="RadioButton2" runat="server" AutoPostBack="True" OnCheckedChanged="RadioButton2_CheckedChanged" /> 
    <telerik:RadComboBox ID="RadComboBox1" runat="server">  
        <Items> 
            <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" /> 
            <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" /> 
            <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" /> 
        </Items> 
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </telerik:RadComboBox> 
</AdvancedInsertTemplate> 

protected void RadioButton2_CheckedChanged(object sender, EventArgs e)  
{  
    RadioButton rb1 = (RadioButton)sender;  
    RadComboBox cb1 = (RadComboBox) rb1.NamingContainer.FindControl("RadComboBox1");  
    cb1.SelectedItem.Text = DateTime.Now.ToString();  

If you want to preserve the functionality of the advanced form related to resources and recurrent appointments, you can use the Customizing the Advanced Template example.


Best wishes,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Swapnil Baokar
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or