title: View model all some fields are returned as null?
body: <p>i have this question i really stock in it, and i almost don't know what to do, this is my action for loading my model, and initialize it</p>
  
  <pre><code>  public ActionResult EditCredentials(int id)
      {
          var user = UserManager.FindById(id);
          var userViewModel = new UserViewModel()
          {
              UserName = user.UserName,
              FName = user.FirstName,
              LName = user.LastName,
              BirthDate = user.BirthDate,
              Phonenumber = user.PhoneNumber,
          };
  
          var allroles = UserRole.Roles;
          var roles = user.Roles;
          var userRoleViewModels = new List&lt;UserRoleViewModel&gt;();
          foreach (var item in allroles)// initialize All of Role view models
          { 
              var newViewModel=new UserRoleViewModel
              {
                  Show = item.Show,
                  RoleId = item.Id,
                  BaseCoding = item.BaseCoding,
                  IsActive = item.IsActive,
                  RoleName = item.Name
  
              };
  
                  foreach (var role in roles.Where(role =&gt; role.RoleId==item.Id))
                  {  //if new Role Exist In userRole table, then apply is checked
                      newViewModel.ApplyPrem = true;
                      newViewModel.UserId = role.UserId;
  
                  }
              userRoleViewModels.Add(newViewModel);
          }
          var userMainViewModel = new UserMainViewModel()// user main view model,  include two model: one "UserViewModel" and a list of "UserRoleViewModel"
          {
              UserViewModel = userViewModel,
              UserRoleViewModel = userRoleViewModels
          };
  
          return View(userMainViewModel);
      }
  </code></pre>
  
  <p>as you can see my view is IList this is my view</p>
  
  <pre><code>  @model IList&lt;Mfr.Admin.Models.User.UserRoleViewModel&gt;
  @using (Html.BeginForm("EditPermissions", "User", FormMethod.Post, new    
   {@class = "form-horizontal"}))
   {
          @for (var i = 0; i &lt; Model.Count; i++)
          {
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          @*id*@
                          @(Html.DisplayFor(modelItem =&gt; modelItem[i].RoleId))
                      &lt;/td&gt;
                      &lt;td&gt;
                          @*Apply Perm*@
                          @Html.CheckBoxFor(modelItem =&gt; modelItem[i].ApplyPrem)
                      &lt;/td&gt;
                      &lt;td&gt;
                          @*name*@
                          @(Html.DisplayFor(modelItem =&gt; modelItem[i].RoleName))
                      &lt;/td&gt;
                      &lt;td&gt;
                          @*base coding*@
                           @(Html.Kendo().CheckBoxFor(modelItem =&gt; modelItem[i].BaseCoding).HtmlAttributes(new { @disabled = "disabled" }))
                      &lt;/td&gt;
                      &lt;td&gt;
                          @*show*@
                            @(Html.Kendo().CheckBoxFor(modelItem =&gt; modelItem[i].Show).HtmlAttributes(new { @disabled = "disabled" }))
                      &lt;/td&gt;
                      &lt;td&gt;
                          @*Active*@
                          @(Html.Kendo().CheckBoxFor(modelItem =&gt; modelItem[i].IsActive).HtmlAttributes(new { @disabled = "disabled" }))
                      &lt;/td&gt;
                  &lt;/tr&gt;
  
              &lt;/tbody&gt;
          }
   }
     &lt;input type="submit" value="update" class="btn btn-success" /&gt;
  </code></pre>
  
  <p>This is the first line of post action</p>
  
  <pre><code>         public ActionResult EditPermissions(IList&lt;UserRoleViewModel&gt; model)
  </code></pre>
  
  <p>the problem is: when I want to post this Models, only applyperm field is modified and returned correctly, and all of the other fields, like userId RoleId and ..., in my view model are returned form view as null?
  Does anyone know Why?
  this is my ViewModel Definition</p>
  
  <pre><code>    public class UserRoleViewModel
      {
      public bool ApplyPrem { get; set; }
      public int UserId { get; set; }
  
      public int RoleId { get; set; }
  
      public string RoleName { get; set; }
  
      public bool IsActive { get; set; }
  
      public bool BaseCoding { get; set; }
  
      public bool Show { get; set; }
  }
  </code></pre>
  
  <p>Just one thing that, when model is initializing in view and iterating through  for in my view, it is loaded completely without any problem, but the problem is begins when I want to post this function in my controller post action.
  Thanx in advance</p>