Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8247123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:44:16+00:00 2026-06-07T22:44:16+00:00

When I perform a radiobuttonclick , I want to set a dropdownlist to become

  • 0

When I perform a radiobuttonclick, I want to set a dropdownlist to become visible. The radiobutton and dropdownlist are within the same datagrid. I am not sure how to do this.

<asp:UpdatePanel ID="updatepanel" UpdateMode="conditional" runat="server">
    <ContentTemplate>
        <asp:DataGrid ID="DataGrid" AutoGenerateColumns = "false" CssClass="objectSubTitle" ItemStyle-Wrap="true" runat="server" OnItemCommand="handler" ><Columns>
            <asp:TemplateColumn>
                <ItemTemplate>
                   <asp:RadioButton ID ="RadioButton1" Text="Yes" GroupName="creatingNewCard" OnCheckedChanged="RadioButtonYes" AutoPostBack="True" runat="server" />
                  <asp:DropDownList ID="DropDownList1"  Visible="false" runat="server"/>
                </ItemTemplate>
            </asp:TemplateColumn>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:44:18+00:00Added an answer on June 7, 2026 at 10:44 pm

    Assuming that they are in an ItemTemplate of a TemplateField and you want to switch vivibility on serverside:

    protected void RbCheckedChanged(Object sender, EventArgs e)
    {
        var radioButton1 = (RadioButton)sender;
        var row = (GridViewRow)radioButton1.NamingContainer;
        var dropDownList1 = (DropDownList)row.FindControl("DropDownList1");
        dropDownList1.Visible = radioButton1.Checked;
    }
    

    Sample-GridView:

    <asp:GridView ID="GridView1" AutoGenerateColumns="false" OnRowDataBound="Grid_RowDataBound"
        runat="server">
        <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:RadioButton  ID="RadioButton1" runat="server" OnCheckedChanged="RbCheckedChanged" AutoPostBack="true"></asp:RadioButton>
            </ItemTemplate>
        </asp:TemplateField>
        </Columns>
    </asp:GridView>
    

    Edit: as you’ve edited your question to show that you really use a DataGrid instead of a GridView, the code is similar:

    protected void RbCheckedChanged(Object sender, EventArgs e)
    {
        var radioButton1 = (RadioButton)sender;
        var item = (DataGridItem)radioButton1.NamingContainer;
        var dropDownList1 = (DropDownList)item.FindControl("DropDownList1");
        dropDownList1.Visible = radioButton1.Checked;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't perform copy operations from my DataGrid to the clipboard. I want to
I perform this kind of query in my Python code to conn = rdbms.connect(instance=_INSTANCE_NAME,
I want to perform an jquery request to php and then I want php
I want to perform action on change in count of rows of an HTML
I want to perform calculations for each company number in the column PERMNO of
Both perform the same operation that is MSDN Singleton: Single Call objects service one
I am trying to perform an update action in GRID VIEW control in asp.net.
I want to perform the method which has a few arguments. Is there any
I would like to perform the same operation on several arrays, something like: #include<vector>
I perform a set of operations on a dataset table: MyDataSet sharedDS = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.