Google+ Followers

Connect

Get Updates Via Email

Enter your email address:

Delivered by FeedBurner

Tuesday, 29 January 2013

How to Hide Gridview and Show the selected gridview row details in Form View using ASP.NET C#


In this post I'm going to post details about how to hide full Gridview by selecting individual gridview row and show that gridview row details in Formview;

In this example, I'm using AdventureWorks Database and datebase table name HumanResources.Employee

Click here to Download AdventureWorks Database 

Here I'll post the code and snapshot details 

1. Design View








































Add connection string code in web.config as below :



2.Design View's Source code in Default.aspx






3. Code Behind : Default.aspx.cs

 

4. Output: a) Gridview Shown
 




4 b) After clicking Full detail in First row in Gridview; Gridview has been hidden and showing Form view of the particular grid view rows full details


4.c) Click Back Button then Grid view has been shown and Form view has been hidden