title: Panel DefaultButton and GridView Control with EditItemTemplate
body: <p>I have a GridView control on a page with a Panel that has a DefaultButton. I am trying to get the "Update" button to work with the Enter key when a user edits a row. It works fine with the mouse. When I click on "Update", the row reverts back to View mode and the updated value is shown.</p>
  
  <p>When the GridView is in the Panel, the Panel's default button (which submits the page) fires when I press Enter, before the RowCommand is even handled, and the update is lost. </p>
  
  <p>When the GridView is not in the Panel, some other seemingly random button in the Panel fires, but not the "Update" button in my row's EditItemTemplate. Specifically, there is a CalendarExtender on the page, and the extender's popup button fires. Totally not what I want.</p>
  
  <p>How can I get this to behave correctly?</p>
  
  <p>Here is the structure of my mark-up code:</p>
  
  <pre><code>&lt;asp:Panel ID="Panel1" runat="server" DefaultButton="btnSubmit"&gt;
  
      &lt;!--Form with controls--&gt;
  
      &lt;asp:ImageButton ID="btnWSPODateCal" runat="server" /&gt;
      &lt;!--this button fires when I press enter while editing a grid row:--&gt;
      &lt;ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" 
      TargetControlID="tbPODate" PopupButtonID="btnWSPODateCal" /&gt;
  
      &lt;!--more controls--&gt;
  
      &lt;div class="button_row"&gt;
          &lt;asp:ImageButton ID="btnCancel" runat="server" /&gt;
          &lt;asp:ImageButton ID="btnSubmit" OnClick="btnSubmit_Click" /&gt;
      &lt;/div&gt;
  &lt;/asp:Panel&gt;
  &lt;asp:GridView runat="server"&gt;
      &lt;Columns&gt;
          &lt;asp:TemplateField&gt;
              &lt;EditItemTemplate&gt;
                  &lt;asp:ImageButton CommandName="MyUpdate" 
                      ID="btnSubmitRow" runat="server"  
                      CommandArgument="&lt;%# ((GridViewRow) Container).DataItemIndex %&gt;" /&gt; 
  </code></pre>