You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
In this article we will learn about how to use DropDownList inside GridView.
In this tutorial, I’ll show you how to use DropDownList inside GridView, and how to perform edit, update, delete operation on each field along with DropDownList. INITIAL CHAMBER Step 1: Open Visual Studio 2010 and create an empty website. Give a suitable name gridview_demo. Step 2: In Solution Explorer you will get your empty website. Add a web form, SQL Database. By following these steps: For Web Form gridview_demo (Your Empty Website) - Right Click, Add New Item, then Web Form. Name it gridview_demo.aspx. For SQL Server Database gridview_demo (Your Empty Website) - Right Click, Add New Item, then SQL Server Database. Add Database inside the App_Data_folder. DATABASE CHAMBER Step 3: Go to your Database [Database.mdf], we will create a table - tbl_Data. Go to the database.mdf - Table, then Add New table. Design your table like the following: Table - tbl_data [Don’t forget to make ID - Identity Specification - Yes] Figure 1: Database DESIGN CHAMBER Step 5: Now Open your gridview_demo.aspx file, where we create our design for binding and performing edit, delete, and update operation with dropdownlist. Gridview_demo.aspx
In Events: [Make Double Click in each event shown below to go to the code]
Figure 3: Row CODE CHAMBER Step 6: Open your gridview_demo.aspx.cs and write some code so that our application starts working.
Hands on with ASP.Net MVC - Covering MVC 6