Bind Dropdown list from Database and show in GridView
How to bind drop down list in mvc using Sql server as Database and show the details in Gridview
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ramya bharathRank #3,780 · 391 reputationPosted Apr 16, 2015, 8:38 AM EDT
For binding dropdownlist here is a examplehttp://www.c-sharpcorner.com/UploadFile/4d9083/binding-dropdownlist-in-mvc-in-various-ways-in-mvc-with-data/
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Apr 16, 2015, 9:34 AM EDT
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted Apr 26, 2015, 11:03 AM EDT
GridView does not exist in MVC - What you can do is to load your grid data via AJAX call and generate the rows on the fly based on the value selected from the list. Or you could use WebGrid like this one:
http://www.authorcode.com/filtering-records-in-webgrid-using-dropdownlist-in-mvc/
Here's another one example: http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/filter-records-in-mvc/