<div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" Font-Names="Arial" Font-Size="11pt" AlternatingRowStyle-BackColor="#C2D69B" HeaderStyle-BackColor="green" OnPageIndexChanging="OnPaging"> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:BoundField DataField="InvestmentType" HeaderText="Investment Type" /> <asp:TemplateField> <HeaderTemplate> Amount: <asp:DropDownList ID="ddlCountry" runat="server" OnSelectedIndexChanged="CountryChanged" AutoPostBack="true" AppendDataBoundItems="true"> <asp:ListItem Text="ALL" Value="ALL"></asp:ListItem> <asp:ListItem Text="Top 10" Value="10"></asp:ListItem> </asp:DropDownList> </HeaderTemplate> <ItemTemplate> <%# Eval("Amount")%> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="MonthlyPay" HeaderText="Monthly Pay" /> <asp:BoundField HeaderStyle-Width="125px" DataField="NumberOfMonths" HeaderText="Months" /> </Columns> </asp:GridView> </div><pre lang="HTML"><pre lang="HTML"><pre lang="HTML">
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int userid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString()); GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex]; Label lblID = (Label)row.FindControl("lblID"); TextBox textName = (TextBox)row.Cells[1].Controls[0]; TextBox textInvestmentType = (TextBox)row.Cells[2].Controls[0]; TextBox textAmount = (TextBox)row.Cells[3].Controls[0]; TextBox textMonthlyPay = (TextBox)row.Cells[4].Controls[0];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)