Groups | Blog | Home
all groups > asp.net datagrid control > september 2004 >

asp.net datagrid control : Dynamically adding a row into an gridview


Alvin Bruney [MVP]
9/22/2004 4:21:59 PM
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
[quoted text, click to view]

Henk
9/22/2004 8:18:36 PM
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



AddThis Social Bookmark Button