Solved

GridView SubHeaders

Posted on 2012-03-15
3
1,491 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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.…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now