Fire Gridview RowUpdating Event without an Update/Save Button
I have a gridview and I would like to Autosave the fields without using a
save or an update button. How do I fire the RowUpdating Event without
using a button? Or is there a better way of implementing this? Thanks for
your help.
<div id="form_BCFLP" class="fm_Medium5" runat="server"
visible="true">
<asp:GridView ID="GV_BCFLP" runat="server"
AutoGenerateColumns="False" DataKeyNames="Id,Name"
GridLines="none" Visible="true"
OnRowUpdating="GV_BCFLP_RowUpdating" EnableViewState="true"
AutoPostback="true">
<Columns>
<asp:BoundField DataField="Name"
ItemStyle-HorizontalAlign="left"
ItemStyle-CssClass="lblSize_LargeBlack"></asp:BoundField>
<asp:TemplateField ItemStyle-HorizontalAlign="left">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
protected void GV_BCFLP_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//I call my webservice here to update data
}
No comments:
Post a Comment