can anyone out there explain this......
i have a datagrid which has an "edit", "update" and "cancel" set up like this:
<asp:datagrid id=dgNormTypes runat="server" DataSource="<%# DataSet61 %>" AutoGenerateColumns="False" DataKeyField="NORM_TYPE" Width="60%" OnUpdateCommand="DoItemUpdate" OnEditCommand="DoItemEdit" OnCancelCommand="DoItemCancel">
<ItemStyle Font-Size="9pt" Font-Names="Tahoma" ForeColor="#006699" BackColor="#E0E0E0"></ItemStyle>
<HeaderStyle Font-Size="9pt" Font-Names="Tahoma" Font-Bold="True" Wrap="False" ForeColor="White"
BackColor="#006699"></HeaderStyle>
<Columns>
<asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" />
" runat="server">
etc.....
then i have the corresponding 3 subroutines "DoItemCancel", "DoItemEdit" and "DoItemUpdate"
for some reason......the DoItemCancel and DoItemUpdate subroutines never execute their code. the DoItemEdit does execute it's code just fine. i can even just make DoItemUpdate have a single response.write("hello") and it never gets written to the page. i can tell that all three do a postback but no matter what.....the code within DoItemUpdate and DoItemCancel never execute. it get's even more perplexing because....i put a response.write("edit") at the end of the code for DoItemEdit. when i hit Edit, it does what it is supposed to do (revealing the Update and Cancel in place of the Edit) and at the top of the page i see the "edit" (from the response.write) - now here's the really strange part......when i click "Update"......i see the page reloaded and AGAIN i see "edit" at the top of the page. it is as though "Update" executes the code inside of "DoItemEdit"
and when i click "Cancel"...it does exactly what i want it to do (closes every thing back up and reveals "Edit" in place of the "Update" and "Cancel") - but....i have no idea HOW or WHY it works as there is no code in the DoItemCancel subroutine! - (the "edit" does not get written to the page when i click Cancel like it does when i click "Update")
anyone have any ideas as to why?
threeo
i have a datagrid which has an "edit", "update" and "cancel" set up like this:
<asp:datagrid id=dgNormTypes runat="server" DataSource="<%# DataSet61 %>" AutoGenerateColumns="False" DataKeyField="NORM_TYPE" Width="60%" OnUpdateCommand="DoItemUpdate" OnEditCommand="DoItemEdit" OnCancelCommand="DoItemCancel">
<ItemStyle Font-Size="9pt" Font-Names="Tahoma" ForeColor="#006699" BackColor="#E0E0E0"></ItemStyle>
<HeaderStyle Font-Size="9pt" Font-Names="Tahoma" Font-Bold="True" Wrap="False" ForeColor="White"
BackColor="#006699"></HeaderStyle>
<Columns>
<asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" />
" runat="server">
etc.....
then i have the corresponding 3 subroutines "DoItemCancel", "DoItemEdit" and "DoItemUpdate"
for some reason......the DoItemCancel and DoItemUpdate subroutines never execute their code. the DoItemEdit does execute it's code just fine. i can even just make DoItemUpdate have a single response.write("hello") and it never gets written to the page. i can tell that all three do a postback but no matter what.....the code within DoItemUpdate and DoItemCancel never execute. it get's even more perplexing because....i put a response.write("edit") at the end of the code for DoItemEdit. when i hit Edit, it does what it is supposed to do (revealing the Update and Cancel in place of the Edit) and at the top of the page i see the "edit" (from the response.write) - now here's the really strange part......when i click "Update"......i see the page reloaded and AGAIN i see "edit" at the top of the page. it is as though "Update" executes the code inside of "DoItemEdit"
and when i click "Cancel"...it does exactly what i want it to do (closes every thing back up and reveals "Edit" in place of the "Update" and "Cancel") - but....i have no idea HOW or WHY it works as there is no code in the DoItemCancel subroutine! - (the "edit" does not get written to the page when i click Cancel like it does when i click "Update")
anyone have any ideas as to why?
threeo