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

Visibility

2 Answers 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chinnu Prabhakar
Top achievements
Rank 1
Chinnu Prabhakar asked on 22 Oct 2009, 04:35 AM
Hi friends,

In Edit appointment (scheduler)  there is a radio button, on clicking the radiobutton a drop down should display ,ie if the radiobutton is not selected visibility of dropdown is false , I dont knw how to do this,
any idea

regards
chinnu

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Oct 2009, 12:53 PM
Hi Chinnu,

I tried following code in order to set the visibility of dropdown placed in AdvancedEditTemplate.

ASPX:
 
<AdvancedEditTemplate> 
    <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="true" GroupName="Advanced" 
        OnCheckedChanged="RadioButton2_CheckedChanged" /> 
    <asp:RadioButton GroupName="Advanced" ID="RadioButton2" runat="server" AutoPostBack="true" 
        OnCheckedChanged="RadioButton2_CheckedChanged" /> 
    <asp:DropDownList ID="DropDownList1" runat="server" Visible="false"
        <asp:ListItem Text="Item1"
        </asp:ListItem> 
        <asp:ListItem Text="Item1"
        </asp:ListItem> 
    </asp:DropDownList> 
</AdvancedEditTemplate> 




C#:
 
protected void RadioButton2_CheckedChanged(object sender, EventArgs e) 
    RadioButton radioButton1 = (RadioButton) (sender); 
    DropDownList dropdown = (DropDownList)(radioButton1.NamingContainer).FindControl("DropDownList1"); 
    if (radioButton1.ID == "RadioButton1"
    { 
        dropdown.Visible = true
    } 
    else 
    { 
        dropdown.Visible = false
    } 

Thanks,
Princy.
0
Chinnu Prabhakar
Top achievements
Rank 1
answered on 23 Oct 2009, 05:31 AM
Hi Princy,

Its not working for me , actually i 'm binding all controls in MultipleValuesResourceControl.ascx and ResourceControl.ascx
Tags
Scheduler
Asked by
Chinnu Prabhakar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Chinnu Prabhakar
Top achievements
Rank 1
Share this question
or