update multiple gridview rows at once in asp.net

I am using a gridview to allow users to enter data into multiple rows.  I want them to be able to click on one Update button and save all the rows at once.
I am using asp.net in VS 2005 and cannot find a simple way to display the gridview in edit mode.  I have found many examples for C+ but not VB.
Can I programatically databind() the gridview and then have it display the one column I need to allow data entry in edit mode??

THANKS
PEAKTTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lotusnotesnewbieCommented:
Yes you can:

Update Featured Items List <asp:ImageButton ImageUrl="~/images/Update.gif" runat="server" OnClick="UpdateFeatured_Click" ID="UpdateFeatured" />

<asp:GridView ID="grdFeatured" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="dtSrcSelFeat" AutoGenerateColumns="False" BorderWidth="0px" PageSize="12" DataKeyNames="ProductID">
<Columns>
<asp:BoundField DataField="productname" HeaderText="Product Name"/>
<asp:TemplateField>
<HeaderTemplate>
Is Featured
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkFeat" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

Protected Sub UpdateFeatured_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles UpdateFeatured.Click
For Each row In GridView1.Rows
txtQty = CType(row.Findcontrol("txtQuantity"), TextBox)
' Do your stuff here
If (txtQty.Text <> "") Then
If Convert.ToInteger(txtQty.Text) > 0 Then
'Create entry into the Orders table here
 
End If
End If
Next
 
End Sub
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.