Solved

GridView SubHeaders

Posted on 2012-03-15
3
1,523 Views
Last Modified: 2012-08-14
Hi,
I added subheaders to gridview same way as they did in the  below link.
http://www.carlj.ca/2008/04/20/adding-or-inserting-subheader-rows-into-a-gridview/
Please check the above link.
I have two grids on the form.The grids have edit command button.When I click on the edit command in one of the grids the sub headers in the 2nd grid got disappearing.

How can the  subheaders remain stayed in 2nd grid while editing the 1st grid.
Please let me know.

Thanks
0
Comment
Question by:KavyaVS
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 37728968
The article does not address the issue of editing a GridView that has custom sub-headers, but generally it's a matter of re-binding the GridView in the RowEditing event after handling the edit. This would cause the RowDataBound event to run again, which would restore your sub-headers. Referring to the article, you would need to write this inside the RowEditing event after handling the edit:

        this.gdvRestaurants.DataSource = GetRestaurants();
        this.gdvRestaurants.DataBind();
0
 

Author Comment

by:KavyaVS
ID: 37729559
Thanks.It worked.
0
 

Author Closing Comment

by:KavyaVS
ID: 37729563
Thanks.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question