C1GridView无法触发rowupdating
前台:
<cc1:C1GridView ID="C1GridView1" runat="server" VisualStyle="Office2007Blue" AutoGenerateColumns="False"
PageSize="30" AllowPaging="True" Width="100%" VisualStylePath="~/C1WebControls/VisualStyles"
OnPageIndexChanging="C1GridView1_PageIndexChanging" OnRowCancelingEdit="C1GridView1_RowCancelingEdit"
OnRowEditing="C1GridView1_RowEditing" OnRowUpdating="C1GridView1_RowUpdating"
OnRowDeleting="C1GridView1_RowDeleting" OnRowCreated="C1GridView1_RowCreated"
DataKeyNames="VendorID">...........
<cc1:C1CommandField CausesValidation="false" ShowEditButton="True" ShowDeleteButton="True" ButtonType="Image"
EditImageUrl="../../img/edit.gif" CancelImageUrl="../../img/cancel.gif" DeleteImageUrl="../../img/delete.gif"
UpdateImageUrl="~/img/accept.gif" HeaderText="操作">
</cc1:C1CommandField>
后台:
protected void C1GridView1_RowEditing(object sender, C1GridViewEditEventArgs e)
{
C1GridView1.EditIndex = e.NewEditIndex;
UpdateView();
}
protected void C1GridView1_RowCancelingEdit(object sender, C1GridViewCancelEditEventArgs e)
{
C1GridView1.EditIndex = -1;
UpdateView();
}
protected void C1GridView1_RowUpdating(object sender, C1GridViewUpdateEventArgs e)
{
C1GridView1.DataSource = GetDataSet();
C1GridView1.Update();
DE.SP_VendorEntityTableAdapters.SP_VendorTableAdapter da = new DE.SP_VendorEntityTableAdapters.SP_VendorTableAdapter();
da.Update(dt);
C1GridView1.EditIndex = -1;
UpdateView();
}
protected void C1GridView1_RowDeleting(object sender, C1GridViewDeleteEventArgs e)
{
dt.DefaultView[e.RowIndex + (C1GridView1.PageIndex * C1GridView1.PageSize)].Delete();
DE.SP_VendorEntityTableAdapters.SP_VendorTableAdapter da = new DE.SP_VendorEntityTableAdapters.SP_VendorTableAdapter();
da.Update(dt);
UpdateView();
}
都写了,就是触发不了rowupdating事件,帮忙分析一下。。 |
|