In my grid I have a FormTemplate and use an ImageButton for both the Update and Canel:
I want to implement my own client-side validation mechanism. When the user clicks the Update button I use the OnClientClick event to call a function where I validate various controls within the FormTemplate. If the validation determines that the user must enter some data, I want to cancel the grid calling the ItemCommand event on the server-side. I have not found any means by which I can cancel the grid from calling the ItemCommand event (or any other event for that matter).
How can I cancel the grid from doing a postback?
Thanks
Johann
| <asp:ImageButton ID="imgUpdate" runat="server" ImageUrl="~/images/Update.gif" ToolTip="Update Record" |
| Style="padding-right: 5px" CommandName="Update" OnClientClick="OnSessionUpdate(this)" /> |
| <asp:ImageButton ID="imgCancel" runat="server" ImageUrl="~/images/Cancel.gif" ToolTip="Cancel Editing" |
| CommandName="Cancel" /> |
I want to implement my own client-side validation mechanism. When the user clicks the Update button I use the OnClientClick event to call a function where I validate various controls within the FormTemplate. If the validation determines that the user must enter some data, I want to cancel the grid calling the ItemCommand event on the server-side. I have not found any means by which I can cancel the grid from calling the ItemCommand event (or any other event for that matter).
How can I cancel the grid from doing a postback?
Thanks
Johann