Here is the code I have:
<asp:GridView ID="grdDays" runat="server" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="wkdDayId" ForeColor="#333333" GridLines="None" OnRowCancelingEdit="grdDays_RowCancelingEdit"
OnRowEditing="grdDays_RowEditing" OnRowUpdating="grdDays_RowUpdating" Width="100%">
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="wkdTitle" HeaderText="Day" ReadOnly="True" />
<asp:BoundField DataField="wkdStartTime" HeaderText="Start" />
<asp:BoundField DataField="wkdFinishTime" HeaderText="Finish" />
<asp:CommandField ShowEditButton="True" ButtonType="Button" />
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
And in code behind i have:
protected void grdTest_RowEditing(object sender, GridViewEditEventArgs e)
{
int a = 1;
this.grdDays.EditIndex = e.NewEditIndex;
this.grdDays.DataBind();
}
protected void grdTest_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int a = 1;
}
protected void grdTest_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
int a = 1;
}
and all get invoked except grdTest_RowUpdating.
Thanks