Solved

GridView SubHeaders

Posted on 2012-03-15
3
1,554 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

687 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