title: Telerik grid updates not working in batch editing
body: <p>I'm using RadGrid in ASPX, .net 4.5. The data comes up and displays in my grid fine, but I cannot update, insert, or delete records. I have followed the sample version as closely as I can:</p>
  
  <p><a href="http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx" rel="nofollow">http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx</a></p>
  
  <p>When I try to modify data in the grid, then hit Save, the grid reloads and the data is unchanged. No errors, just no updates.</p>
  
  <p>Originally I had the grid wrapped in ajax panel, but when these problems occurred, I removed it. That made not much difference; though when I was using ajax panel, often times clicking the Save icon did absolutely nothing. Or appeared to do nothing. So with that gone, the page/grid does normal postbacks EXCEPT that none of my event handlers are being called. Page_Load gets called, but nothing else (for example RadGrid1_BatchEditCommand, RadGrid1_ItemUpdated). It seems these should be getting called. </p>
  
  <p>ASPX code:</p>
  
  <pre><code>&lt;telerik:RadScriptManager runat="server" ID="RadScriptManager1" /&gt;
                  &lt;telerik:RadListBox runat="server" ID="SavedChangesList" Width="600px" Height="200px" Visible="false"&gt;&lt;/telerik:RadListBox&gt;
                  &lt;telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
                      AllowAutomaticInserts="True" PageSize="10" Skin="Default" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
                      OnItemUpdated="RadGrid1_ItemUpdated" OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"
                      AutoGenerateColumns="False" Width="1000px" OnBatchEditCommand="RadGrid1_BatchEditCommand" DataSourceID="sqlContractMatrix"&gt;
                      &lt;MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ID" DataSourceID="sqlContractMatrix" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False"&gt;
                          &lt;BatchEditingSettings EditType="Cell" /&gt;
                          &lt;SortExpressions&gt;
                              &lt;telerik:GridSortExpression FieldName="SiteID,ProductID" SortOrder="Descending" /&gt;
                          &lt;/SortExpressions&gt;
                          &lt;Columns&gt;
                              &lt;telerik:GridTemplateColumn HeaderText="Site" HeaderStyle-Width="150px" UniqueName="SiteID" DataField="SiteID"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;%# Eval("SiteName") %&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;telerik:RadDropDownList runat="server" ID="ddlSites" AppendDataBoundItems="true" DataValueField="SiteID" DataTextField="SiteName" DataSourceID="sqlSites"&gt;
  
                                      &lt;/telerik:RadDropDownList&gt;
                                  &lt;/EditItemTemplate&gt;
                              &lt;/telerik:GridTemplateColumn&gt;
  
                              &lt;telerik:GridTemplateColumn HeaderText="Product" HeaderStyle-Width="150px" UniqueName="ProductID" DataField="ProductID"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;%# Eval("ProductName") %&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;telerik:RadDropDownList runat="server" ID="ddlProducts" DropDownWidth="250" DropDownHeight="400" DefaultMessage="Product" AppendDataBoundItems="true" DataValueField="ProductID" DataTextField="ProductName" DataSourceID="sqlProducts"&gt;
  
                                      &lt;/telerik:RadDropDownList&gt;
                                  &lt;/EditItemTemplate&gt;
                              &lt;/telerik:GridTemplateColumn&gt;
  
                              &lt;telerik:GridAttachmentColumn DataSourceID="sqlContractMatrix" MaxFileSize="1048576" HeaderStyle-Width="250px"
                                  EditFormHeaderTextFormat="Upload File:" HeaderText="HTML Template" AttachmentDataField="BinaryData"
                                  AttachmentKeyFields="ID" FileNameTextField="TemplateFileBinary" DataTextField="TemplateFileBinary"
                                  UniqueName="TemplateFileBinary"&gt;
                              &lt;/telerik:GridAttachmentColumn&gt;
  
                              &lt;%--
                              &lt;telerik:GridBoundColumn DataField="TemplateFile" HeaderStyle-Width="200px" HeaderText="Template"
                                  SortExpression="TemplateFile" UniqueName="TemplateFile"&gt;
                              &lt;/telerik:GridBoundColumn&gt;
                              --%&gt;
  
                              &lt;telerik:GridBoundColumn DataField="PDFName" HeaderStyle-Width="200px" HeaderText="PDF Name"
                                  SortExpression="PDFName" UniqueName="PDFName"&gt;
                              &lt;/telerik:GridBoundColumn&gt;
                              &lt;telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                                  ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
                                  CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"&gt;
                              &lt;/telerik:GridButtonColumn&gt;
                          &lt;/Columns&gt;
                      &lt;/MasterTableView&gt;
                  &lt;/telerik:RadGrid&gt;
                  &lt;asp:SqlDataSource ID="sqlContractMatrix" runat="server" ConnectionString="&lt;%$ ConnectionStrings:FitTrack %&gt;"
                      DeleteCommand="DELETE FROM ContractMatrix WHERE ID = @ID" 
                      InsertCommand="INSERT INTO ContractMatrix (SiteID, ProductID, TemplateFile, PDFName, LastModifiedDate, LastModifiedByID) VALUES (@SiteID, @ProductID, @TemplateFile, @PDFName, @LastModifiedDate, @LastModifiedByID)"
                      UpdateCommand="UPDATE ContractMatrix SET SiteID = @SiteID, ProductID = @ProductID, TemplateFile = @TemplateFile, PDFName = @PDFName, LastModifiedDate = GETDATE(), LastModifiedByID = @LastModifiedByID WHERE ID = @ID"&gt;
                      &lt;DeleteParameters&gt;
                          &lt;asp:Parameter Name="ID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                      &lt;/DeleteParameters&gt;
                      &lt;InsertParameters&gt;
                          &lt;asp:Parameter Name="SiteID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="ProductID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="TemplateFile" Type="String"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="PDFName" Type="String"&gt;&lt;/asp:Parameter&gt;
                      &lt;/InsertParameters&gt;
                      &lt;UpdateParameters&gt;
                          &lt;asp:Parameter Name="SiteID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="ProductID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="TemplateFile" Type="String"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="PDFName" Type="String"&gt;&lt;/asp:Parameter&gt;
                          &lt;asp:Parameter Name="ID" Type="Int32"&gt;&lt;/asp:Parameter&gt;
                      &lt;/UpdateParameters&gt;
                  &lt;/asp:SqlDataSource&gt;
  
                  &lt;!-- SQL data sources for various lookup tables --&gt;
                  &lt;asp:SqlDataSource ID="sqlSites" runat="server" ConnectionString="&lt;%$ ConnectionStrings:FitTrack %&gt;" ProviderName="System.Data.SqlClient" SelectCommand="SELECT SiteID, SiteName FROM gym.Site ORDER BY SiteID"&gt;&lt;/asp:SqlDataSource&gt;
                  &lt;asp:SqlDataSource ID="sqlProducts" runat="server" ConnectionString="&lt;%$ ConnectionStrings:FitTrack %&gt;" ProviderName="System.Data.SqlClient"&gt;&lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>C# code:</p>
  
  <pre><code>protected void RadGrid1_BatchEditCommand(object sender, Telerik.Web.UI.GridBatchEditingEventArgs e)
          {
              SavedChangesList.Visible = true;
          }
  
          protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
          {
              GridEditableItem item = (GridEditableItem)e.Item;
              string id = item.GetDataKeyValue("ID").ToString();
              if (e.Exception != null)
              {
                  e.KeepInEditMode = true;
                  e.ExceptionHandled = true;
                  NotifyUser("Record with ID " + id + " cannot be updated. Reason: " + e.Exception.Message);
              }
              else
              {
                  NotifyUser("Record with ID " + id + " is updated!");
              }
          }
  
          protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)
          {
              if (e.Exception != null)
              {
                  e.ExceptionHandled = true;
                  NotifyUser("Product cannot be inserted. Reason: " + e.Exception.Message);
              }
              else
              {
                  NotifyUser("New product is inserted!");
              }
          }
  
          protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)
          {
              GridDataItem dataItem = (GridDataItem)e.Item;
              string id = dataItem.GetDataKeyValue("ID").ToString();
              if (e.Exception != null)
              {
                  e.ExceptionHandled = true;
                  NotifyUser("Product with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message);
              }
              else
              {
                  NotifyUser("Product with ID " + id + " is deleted!");
              }
  
          }
  </code></pre>
  
  <p>Please help. Why are the data updates not occurring? Why are none of the telerik events/methods in the codebehind being called? Only Page_Load() is executing, none of the others.</p>