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 3397336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:30:58+00:00 2026-05-18T04:30:58+00:00

I am developing an application using C#. I am using RadioButtonlist control inside a

  • 0

I am developing an application using C#. I am using RadioButtonlist control inside a TreeView. I am getting collection of items from database. Based on the collection items I need to select the Radiobuttonlist items.

For example from the database i got the Collection in this way: Read(R) Write(W)

based on this colletion i need to set up the user permissions.

  • 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-05-18T04:30:59+00:00Added an answer on May 18, 2026 at 4:30 am

    If I get your question right you want to bind that radiobutton list based on the items in the database based on the current row item on the grid. If thats the case here is your solution.

    Lets say you have a Grid called myGrid, a RadioButtonList called myRadio and a HiddenField called myHidden (this is where you bind the value you have on “R” and “W”)

    All you have to do is when a RowDataBound Event Occurs then you have to assign the value to myRadio

    for Example, you have a RadioButtonList like such

    <asp:RadioButtonList ID="myRadio" runat="server">
        <asp:ListItem Value="R">Read</asp:ListItem>
        <asp:ListItem Value="W">Write</asp:ListItem>
    </asp:RadioButtonList>
    

    So your code behind should look like this

    protected void myGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            RadioButtonList rdoAnswer = (RadioButtonList)e.Row.FindControl("myRadio");
            HiddenField hdnValue = (HiddenField)e.Row.FindControl("myHidden");
    
            rdoAnswer.SelectedValue = hdnValue.Value;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a Rails application using a database that was designed before
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
I am developing an application using MVC Preview 5. I have used typed views.
I am developing an application using Windows Mobile 5.0, under embedded VC++ 4.0, and
I developing ASP.NET application using a Swedish version of Windows XP and Visual studio
I'm developing a web- application using NHibernate. Can you tell me how to write
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I'm developing a Java application using Eclipse. My project has two source directories that
I am developing a WinForms application using the MVP pattern. I would like to
Hey I am developing an desktop application using Spring and Hibernate, and I have

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.