Expand|Select|Wrap|Line Numbers
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
- <Columns>
- <asp:CommandField ShowEditButton="True" />
- <asp:BoundField DataField="PERSON_ID" HeaderText="ID" />
- <asp:BoundField DataField="YEAR" HeaderText="Year" />
- </Columns>
- </asp:GridView>
Expand|Select|Wrap|Line Numbers
- Private Sub BindGrid()
- GridView1.DataSource = GetData(iID, iYear)
- GridView1.DataBind()
- End Sub
- Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles GridView1.RowEditing
- GridView1.EditIndex = e.NewEditIndex
- BindGrid()
- End Sub
- Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GridView1.RowUpdating
- 'handle Update here
- End Sub