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

  • SEARCH
  • Home
  • 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 186301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:37:22+00:00 2026-05-11T15:37:22+00:00

I have a fairly standard ASP.NET GridView that displays 2 columns that have a

  • 0

I have a fairly standard ASP.NET GridView that displays 2 columns that have a parent child relationship. Although the relationship exists in the database between column A and column B, the GridView does not implement it.

I would like to do the following: When the user has elected to edit the row, 2 dropdown menus become visible. The DropDownB should automatically be populated with the available options based upon DropDownA’s value. When DropDownA changes, DropDownB needs to be updated to reflect the current options.

Columns currently available to the grid:

 - ColumnAID  - ColumnADescription  - ColumnBID  - ColumnBDescription 

I can certainly accomplish this same functionality outside of the grid, could even have a selected row event display a modal popup allowing me to edit the fields accordingly, but would like to keep this contained to the grid.

  • 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. 2026-05-11T15:37:23+00:00Added an answer on May 11, 2026 at 3:37 pm

    This is how you should so It.

    1.) Goto Column editor of the GridView. And convert the Column to Template which you want to display the DropDownList instead of the TextBox.

    2.) Goto GridView SmartTag and select the Option to Edit Templates. Select the Column you converted into Template in GridView Column Editor.

    3.) This Column will have the Template for all the Views. Select the Edit view. This will already have TextBox there.

    4.) Remove the TxtBox and put a DropDownList there. You need to configure the DropDownList to populate the data from Foreign Table by using ObjectDataSource or SqlDataSource. The Value prop. of the DropDownList should be set to P.Key of the ForeginTable.

    5.) Now, bind the SelectedValue field to the Foregin Key in your table. If you use Bind it will perform Two-Way binding to Read/Write, If you use Eval it will perform OneWay binding to Read and set the default value only.

    For more info visit this link.

    LinkTxt: http://www.asp.net/learn/data-access/tutorial-20-cs.aspx

    Thanks.

    hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly standard OLTP normalised database and I have realised that I
So, we have an ASP.Net application - fairly standard - and in there are
I have a fairly standard ASP.Net web application which is used via mobile safari
I have a fairly standard .Net MVC Controller method: public ActionResult Add(Customer cust) {
We have a data driven ASP.NET website which has been written using the standard
In my Rails app I have a fairly standard has_many relationship between two entities.
I have a fairly complex ASP MVC set of controls that set a data
I have a fairly standard star voting functionality in my app that uses jQuery's
I have a fairly standard mod_rewrite that comes packaged with a CMS called Modx
I've noticed that apps like instagram and picplz have a fairly standard screen that

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.