title: Select2 doesn't show options
body: <p>I'm currently testing Select2.js in my ASP.NET MVC project.</p>
  
  <p>The first test on a "normal" view just worked fine but now I'm trying to add this to a select box inside a partial view that gets loaded on Ajax Call and then displayed inside a <code>&lt;div&gt;</code> on the normal view page.</p>
  
  <p>The code to generate the dropdown looks like this:</p>
  
  <pre><code>@Html.DropDownList("addRole",
     new SelectList(ViewBag.availableRoles, "Id", "Name"),
     "Rolle auswählen", 
     new { @name="addRole", @class = "form-control" }
  )
  </code></pre>
  
  <p>And on the end of the partial view file I added the following:</p>
  
  <pre><code>$(document).ready(function () {
      //var data = [{ id: 1, text: "Test" }];
  
      $("#addRole").select2({
          //data: data
      });
  });
  </code></pre>
  
  <p>It looks like it works because of the look of the select box changes but when I try to open it, it just shows nothing. Same happens when I uncomment the <code>data</code> variable code above.</p>
  
  <p>It just doesn't show anything to me and I don't know why.</p>
  
  <p>I've already tried to add the JavaScript code to <code>$(document).ajaxComplete</code> or in the <code>success</code> function from the AJAX call but it doesn't change anything.</p>