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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:40:32+00:00 2026-05-24T23:40:32+00:00

Scenarios I am using DataGrid with a column containing DropDownList . When I update

  • 0

Scenarios

I am using DataGrid with a column containing DropDownList. When I update the values, the DropDownList value does not get updated.

My Research so far

I believe it needs some C# code to made the DropDownList editable. I don’t know where to put the code and how? Is there a shorter way than C# code?

Thank you very much

Edit : Supplied Code

student_table : id, name, major, favorite_teacher

teacher_table : id, name

The gridview has datasource of student. The DropDownList has datasource of teacher.

In the gridview with, I have made favorite_teacher as template field (DropDownList) and has teacher_table as datasource. In the edit mode, the DropDownList shows correct and populates teachers from the teacher table. When I select a favourite teacher for any student and click submit, the submit does not go through. I might need some C# code or otherwise. Don’t know how to fix this problem.

  • 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-24T23:40:33+00:00Added an answer on May 24, 2026 at 11:40 pm

    I implemented this from a tutorial here without writing any C# code.

    You do not need C# code, although you can implement it using C# code as well.

    There is a trick that you have to implement. You need to bind the values of gridview to a datasource of the other table that you want to fetch data from. But by design, since dropdown list is contained in GridView, it can only be bound to gridview fields. This is the main complication.

    To overcome that, include those additional fields in the gridview. You may need to use join statement so that you can include all the fields that you need in gridview. Now you can easily bind those fields to DropDownlist. Of course you do not need to show these extra values in GridView, they are there only for DropDownList. This will solve your problem, without writing a single line of code.

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

Sidebar

Related Questions

I'm running testing scenarios to decide whether or not to implement a system using
A few test scenarios have been recorded using CodedUI test template for my web
The Scenario Using jQuery, I have a page that has a popup overlay containing
I'm using the WPF Toolkit's DataGrid to display a set of search results. As
I am using Solr and SolrNet for some simple scenarios in an ASP.NET MVC
I just started using Cucumber and in the simplest of scenarios I throw the
I am just trying with various WCF(in .Net 3.0) scenarios. I am using self
I know Scope_Identity() , Identity() , @@Identity , and Ident_Current() all get the value
I am using Selenium IDE to record some scenarios and wanted to check if
I'm using rspec for testing and hornsby scenarios for object graphs used in tests.

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.