GridView Seond Header Problem

Posted by EyeCoder under ASP.NET on 5/9/2010 | Views : 2766 | Status : [Member] | Replies : 1
Dear All,

Finally i was able to add a second header at run time on my gridview using OnRowCreated event....
using this article " "

if (e.Row.RowType == DataControlRowType.Header)

//adding the row


but the problem is that i can't add the header on the second header Row ( after the main header)

e second link was really usefull, but the problem is i can't add the second header at row[1] only at row[0] like this statement, if I replaced 0 with 1 the out of index exception will be fired

GridViewRow row = new GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal);

if i replaced 1 with 0 in the code above an out of index exception is created.

is there any work around i can add the header on the second header row at postion[1] ? ;


Posted by: lakhansin-22735 on: 7/13/2013 [Member] Starter | Points: 25


Can you please provide us a sample code? It will be more easier to understand actual run time errors.


Lakhan Singh
Tech Lead
BeyondKey System Pvt. Ltd.
Indore, M.P.

EyeCoder, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response