Dynamically adding a row into an gridview

Discussion in 'ASP .Net' started by Henk, Sep 22, 2004.

  1. Henk

    Henk Guest

    Hi All,

    I want to dynamically add a row in my gridview. I want to have a row beneath
    my headerrow with dropdowns in it, which I can use to filter on that column.
    I thought the GridView.RowCreated event would be my friend, by checking
    there if I would have an headerrow and then insert a new GridViewRow object.
    But alas, I cannot add rows to the GridView.Row collection, it seems to be
    read only, and I don't see any AddRow or InsertRow (or AddItem, InserItem)
    methods.

    Anyone knows how to deal with this or have any links for me, since google
    wasn't much of a help this time? I really would like to use the gridview and
    not the datagrid now that I am working in asp.net 2.0.

    regards,
    Henk
     
    Henk, Sep 22, 2004
    #1
    1. Advertising

  2. what's with the cross posting? you can't be that desperate. asp.net 2.0
    problems belong in the asp.net 2.0 newsgroup

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "Henk" <> wrote in message
    news:...
    > Hi All,
    >
    > I want to dynamically add a row in my gridview. I want to have a row
    > beneath
    > my headerrow with dropdowns in it, which I can use to filter on that
    > column.
    > I thought the GridView.RowCreated event would be my friend, by checking
    > there if I would have an headerrow and then insert a new GridViewRow
    > object.
    > But alas, I cannot add rows to the GridView.Row collection, it seems to be
    > read only, and I don't see any AddRow or InsertRow (or AddItem, InserItem)
    > methods.
    >
    > Anyone knows how to deal with this or have any links for me, since google
    > wasn't much of a help this time? I really would like to use the gridview
    > and
    > not the datagrid now that I am working in asp.net 2.0.
    >
    > regards,
    > Henk
    >
    >
    >
    >
     
    Alvin Bruney [MVP], Sep 22, 2004
    #2
    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. lucky
    Replies:
    0
    Views:
    527
    lucky
    Jan 12, 2005
  2. H5N1
    Replies:
    0
    Views:
    2,771
  3. Replies:
    5
    Views:
    697
  4. Henk

    Dynamically adding a row into an gridview

    Henk, Sep 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    259
    Alvin Bruney [MVP]
    Sep 22, 2004
  5. Henk

    Dynamically adding a row into an gridview

    Henk, Sep 22, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    445
    Alvin Bruney [MVP]
    Sep 22, 2004
Loading...

Share This Page