adding a row to the grid view

E

Etariq

is there a way for adding a row before the header row so it can be used as
another header ,
 
E

Etariq

hi
What are you going to put there?
text
any way if u have a way pleas send
i haev this way
in the
RowDataBound event add this code

any way to make more dynamic by passing a parameters to enable multi rows
and cells



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

{

GridViewRow row;

for (int i = 0; i < NumborOfHeaders; i++)

{

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

for (int n = 0; n < NumborofCels; n++)

{

TableCell Cell;

Cell = new TableCell();

Cell.ColumnSpan = colspan;

Cell.Controls.Add(new LiteralControl(strhtml));

row.Cells.Add(Cell);

}


e.Row.Parent.Controls.AddAt(0, row);




Eliyahu Goldin said:
What are you going to put there?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

Etariq said:
is there a way for adding a row before the header row so it can be used
as another header ,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top