title: Edit, Delete and Insert in a programmatically created GridView
body: <p>So I'm facing a problem. In fact i have created a databound GridView programmatically. The problem is I want to be interactive (update , delete, insert and all that drill) but only using c# since i have created it programmatically.
  Here is the code that'ive created with the GridView</p>
  
  <pre><code> GridView grid = new GridView();
              //CSS
              grid.CssClass = "grid";
              grid.ForeColor = System.Drawing.Color.Gray;
              grid.ShowFooter = true;
              grid.AlternatingRowStyle.CssClass = "gridAltRow";
              grid.RowStyle.CssClass = "gridRow";
              grid.FooterStyle.CssClass = "gridFooterRow";
              grid.DataKeyNames = new string[] { "ID" };
              grid.RowCommand
  
  
  
  
              //End Css
  
              grid.AutoGenerateEditButton = true;            
  
              grid.DataSource = element.GetElementByRubric(testrub.ID);
  
              panel.Controls.Add(grid);
              grid.DataBind();
  
              TabContainer1.Tabs.Add(panel);
  </code></pre>
  
  <p>as you can see i added an edit button but it does nothing of course. Does anyone have any suggestions ??</p>
  
  <p>thx</p>