title: Include a button in the Grid
body: <p>I'm trying to include button details wich allows to go to page detail</p>
  
  <pre><code> $("#Grid").ejGrid({
                  dataSource: ej.DataManager({
                   ...
  columns: [
  { headerText: 'Detail', commands: ['type:"detail", buttonOptions:{text: "details", click:"OnClick"}} ],},
           ],
  </code></pre>
  
  <p>And then i defined my function : </p>
  
  <p><code>function OnClick(id){
   var url = '@Url.Action("Detail","ServicesOrder", new {id="__id__"})';
  window.location.href=url.replace('__id__',id);
  }</code></p>
  
  <p>my controller ServicesOrder</p>
  
  <pre><code> public IActionResult Detail(int id)
      {ServicesOrder ServicesOrder = _context.ServicesOrder.SingleOrDefault(x =&gt; x.ServicesOrderId.Equals(id));
  
          if (ServicesOrder == null)
          {
              return NotFound();
          }
  
          return View(ServicesOrder);
      }
  </code></pre>
  
  <p>the mistake I get</p>
  
  <p>This site page is not found at: </p>
  
  <p><strong>https: // localhost: 44337 / ServicesOrder/Detail/[object% 20Object]</strong></p>
  
  <p>I have folloed to the letter your code, but is not working (see image).
  <a href="https://i.stack.imgur.com/R7QaO.png" rel="nofollow noreferrer">Error 2 </a></p>
  
  <p>Thank you</p>