adding a row to the grid view

Discussion in 'ASP .Net Datagrid Control' started by Etariq, Jul 11, 2006.

  1. Etariq

    Etariq Guest

    is there a way for adding a row before the header row so it can be used as
    another header ,
     
    Etariq, Jul 11, 2006
    #1
    1. Advertising

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

    "Etariq" <> wrote in message
    news:%...
    > is there a way for adding a row before the header row so it can be used as
    > another header ,
    >
     
    Eliyahu Goldin, Jul 11, 2006
    #2
    1. Advertising

  3. Etariq

    Etariq Guest

    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" <> wrote in message
    news:ehc$...
    > What are you going to put there?
    > --
    > Eliyahu Goldin,
    > Software Developer & Consultant
    > Microsoft MVP [ASP.NET]
    >
    > "Etariq" <> wrote in message
    > news:%...
    >> is there a way for adding a row before the header row so it can be used
    >> as another header ,
    >>

    >
    >
     
    Etariq, Jul 12, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maheshkumar.R
    Replies:
    1
    Views:
    5,497
    Charlie@NISH
    Aug 12, 2005
  2. Luqman
    Replies:
    2
    Views:
    3,858
    Luqman
    Feb 1, 2006
  3. CK

    Grid View Row Value

    CK, Oct 31, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    569
    Eliyahu Goldin
    Nov 1, 2006
  4. wahtnamas
    Replies:
    0
    Views:
    929
    wahtnamas
    May 1, 2009
  5. Parthiv Joshi
    Replies:
    1
    Views:
    768
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page