How to add a new row to GridView control

G

Guest

Hi

I am using two GridView controls which are populated programatically. A find
button populates a GridView1 if a search was successful. For each item
selected in GridView1, I retrieve a collection and populate GridView2 on the
same page.
I have added a button control on each row of the GridView1. Idea is to add a
new row to the bottom of the GridView2 when the add is clicked so a record is
added to the collection of GridView2 corresponding to the selected row in
GridView1 if that row/record is already not present in GridView2. I am using
ASP:BoundField for all columns in GridView2 and <EditItemTemplate> for the
Editable column.

Can someone please help me to figure out how I can achieve this row additon.
I know there is a way using <FooterTemplate> but not sure how to implement it.

Thanks in advance.
 
G

Guest

You can't really ad rows to a gridview as such, what you actually want to do
is add rows to the datasource that is bound to the gridview.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top