title: The GridView 'GridView1' fired event RowDeleting which wasn't handled , but there is an event
body: <p>ı have been traying to create dynamic control panel using webusercontrol , delegate,and ADO.
  Even ı have write the delegate for deleting and editing ı faced with "The GridView 'GridView1' fired event RowDeleting which wasn't handled."problem . Can anybody help me pls
  here is my codes</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          GridView1.DataSource = this.DataSource;
          GridView1.DataBind();
          GridView1.DataKeyNames = new string[] { this.DataKeyNames };
  
      }
  
      public object DataSource { get; set; }
      public string DataKeyNames { get; set; }
  
      public event GridHander RowDeleting;
      public event GridHander RowSawing;
  
  
      protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
      {
          GridViewRow gvr = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
          int rowIndex = gvr.RowIndex;
          object id = GridView1.DataKeys[rowIndex].Value;
  
          switch (e.CommandName)
          {
              case "Edit":
                  GridView1.EditIndex = rowIndex;
                  break;
  
              case "Delete":
                  if (RowDeleting != null)
                  {
                      GridEventArgs args = new GridEventArgs() 
                      {
                           row=gvr,
                           id=id,
                           rowIndex=rowIndex
                      };
                      RowDeleting.Invoke(e.CommandSource, args);
                  }
                  break;
  
              case"Save":
                  if (RowSawing != null)
                  {
                      GridEventArgs args = new GridEventArgs() 
                      {
                          row = gvr,
                          id = id,
                          rowIndex = rowIndex
                      };
                      RowSawing.Invoke(e.CommandSource, args);
  
                  }
                  GridView1.EditIndex = -1;
                  break;
  
              case "Cancel":
                  GridView1.EditIndex = -1;
                  break;
  
              default:
                  break;
          }
      }
  }
  </code></pre>
  
  <p>//My webform</p>
  
  <pre><code>ublic partial class CategoryControlPanel : System.Web.UI.Page
  {
      CategoryResposite _categoryResposite=new CategoryResposite();
  
      protected void Page_Load(object sender, EventArgs e)
      { 
          ControlPanel.DataSource = _categoryResposite.ListCategories();
          ControlPanel.RowDeleting += ControlPanel_RowDeleting;
          ControlPanel.RowSawing += ControlPanel_RowSawing;
      }
  
      void ControlPanel_RowSawing(object sender, GridEventArgs e)
      {
          throw new NotImplementedException();
      }
  
      void ControlPanel_RowDeleting(object sender, GridEventArgs e)
      {
          _categoryResposite.DeleteCategories(Convert.ToInt32(e.id));   
      }
  </code></pre>