title: How to add a delete command button in devExpress gridview from codebehind?
body: <p>I am using DevExpress gridview that have a command button inside. I want to use image instead of it. How can be it possible? </p>
  
  <p>Upto now I have tried this much : </p>
  
  <pre><code>GridViewCommandColumn commancol = new GridViewCommandColumn(); 
  commancol.ButtonType = ButtonType.Image; 
  GridViewCommandColumnButton moveUpBtn; 
  moveUpBtn.Image.Url = "~/App_Themes/Images/GridControl/grid-delete.png"; 
  commancol.Add(moveUpBtn); 
  </code></pre>
  
  <p>But it is giving error. </p>
  
  <p>I want to add a below way button from .cs page instead of aspx page. so i tried to above way from codebehind.</p>
  
  <pre><code>&lt;dx:GridViewCommandColumn ButtonType="Image"&gt;
              &lt;HeaderTemplate&gt;
              &lt;/HeaderTemplate&gt;
              &lt;DeleteButton Visible="true" Text="" Image-Url="grid-delete.png"
                  Image-ToolTip="Delete Record"&gt;
              &lt;/DeleteButton&gt;
          &lt;/dx:GridViewCommandColumn&gt;
  </code></pre>
  
  <p>Thanks</p>