Solved

GridView SubHeaders

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Content Page 3 51
Running powershell scripts from ASP.NET 6 57
How to repeat the data 4 30
I need help adding validation to my MVC.Net view 6 21
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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