title: How to use DevExtreme in partial view (ASP.NET MVC)?
body: <p>I try to use DevExtreme component in partial view.
  But my partial view page shown when I click on the element.</p>
  
  <p>And in the main page after the click I have error</p>
  
  <pre><code>Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ApplicationEntity' with type 'System.Data.Entity.DynamicProxies.ApplicationEntity_50A6A66F1464C1DE4E8A736E85D88C5AF4F4249EAE26FB21C4F82592E001885D'. Path 'data[0].ApplicationEntity.ApplicationEntityHistories[0]'.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5csDF.png" rel="nofollow noreferrer">browser console screen</a></p>
  
  <p><strong>Main page Code:</strong></p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="col-md-7"&gt;
     &lt;button id="btn"&gt;CLICK&lt;/button 
  
  &lt;/div&gt;
  &lt;div class="col-md-5" id="divPartialViewContainer"&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
  $(document).ready(function () {
  
      $("#btn").on("click", function () {
          var text = $(this).text().trim();
          if (text.length &gt; 0) {
              console.log(text);
              $.ajax({
                  url: '/RiskMap/RiskDetailsPartial/',
                  type: 'POST',
                  contentType: 'application/json',
                  data: JSON.stringify({ 'param': text }),
                  success: function (content) {
                      $('#divPartialViewContainer').html(content);
                  },
                  error: function (e)
                  {
                      console.log(e);
                  }
              });
          }
         });
  
       });
   &lt;/script&gt;
  </code></pre>
  
  <p><strong>Controller Code</strong></p>
  
  <pre><code>[HttpPost]
  public async Task&lt;ActionResult&gt; RiskDetailsPartial(string param)
  {          
    return PartialView("_RiskDetails", new List&lt;Risk&gt;());
  }
  </code></pre>
  
  <p><strong>Partial View code:</strong></p>
  
  <pre><code>@model IEnumerable&lt;Core.Models.Risk&gt;
  @using Core.Models
  @using Core.ComplexTypes
  @{
     ViewBag.Title = "Risks";
  }
  
  &lt;h2&gt;Risks&lt;/h2&gt;
  
  @(Html.DevExtreme().DataGrid&lt;Risk&gt;()
      .DataSource(Model)
      .Columns(columns =&gt;
      {
          columns.AddFor(m =&gt; m.Id);
          columns.AddFor(m =&gt; m.Impact);
          columns.AddFor(m =&gt; m.Probability);
  
      })
    )
  </code></pre>