title: Wrong mehods are called
body: <p>I have an asp.net mvc4 page in which there is one form and two grids, but my problem is that the grids are firing the wrong methods and I have no clue what is wrong.</p>
  
  <p>My update method is calling the update method and other methods are firing wrong methods as well.</p>
  
  <p>Can anyone figure this out?</p>
  
  <pre><code>&lt;%: Html.Kendo().Grid&lt;SSTS.Models.StudentsViewModel&gt;()
      .Name("grid")
            .Columns(columns =&gt;
            {
                // columns.Bound(student =&gt; student.CustomerName);
                columns.Bound(student =&gt; student.SchoolYear).Width(160);
  
  
                columns.Bound(student =&gt; student.YearStart).Width(50);
                columns.Bound(student =&gt; student.YearEnd).Width(50);
                  columns.Command(commands =&gt;
                {
                    commands.Edit(); // The "edit" command will edit and update data items
                    commands.Destroy(); // The "destroy" command removes data items
                }).Title("Commands").Width(50);
            })
            .ToolBar(toolbar =&gt; toolbar.Create()) // The "create" command adds new data items
            .Editable(editable =&gt; editable.Mode(GridEditMode.InLine)) // Use inline editing mode
            .DataSource(dataSource =&gt;
                dataSource.Ajax()
                  .Model(model =&gt;
                  {
  
                      model.Id(student =&gt; student.StudentNumber); // Specify the property which is the unique identifier of the model
                  //    model.Field(student =&gt; student.StudentNumber).Editable(false); // Make the studentID property not editable
  
  
                  })
                  .Create(create =&gt; create.Action("students_Create", "Student")) // Action invoked when the user saves a new data item
                  .Read(read =&gt; read.Action("students_Read", "Student"))  // Action invoked when the grid needs data
                  .Update(update =&gt; update.Action("students_Update", "Student"))  // Action invoked when the user saves an updated data item
                  .Destroy(destroy =&gt; destroy.Action("students_Destroy", "Student")) // Action invoked when the user removes a data item
            )
                .Pageable()
  %&gt;
  &lt;%: Html.Kendo().Grid&lt;SSTS.Models.StudentsViewModel&gt;()
      .Name("grid2")
            .Columns(columns =&gt;
            {
                // columns.Bound(student =&gt; student.CustomerName);
                columns.Bound(student =&gt; student.BoardingPoint);//.ClientTemplate("#=CustomerNames.CustomerName#").Width(160);
  
                columns.Bound(student =&gt; student.StudentNumber).ClientTemplate(
      "&lt;a href='" +
          Url.Action("ViewStudent", "Home") +
          "/#= StudentNumber #'" +
      "&gt;#= StudentNumber #&lt;/a&gt;"
  ); ;
  
  
                columns.Bound(student =&gt; student.Description).Width(250);
                columns.Bound(student =&gt; student.NumberofSections).Width(250);
                columns.Bound(student =&gt; student.ContactNumber).Width(250);
                  columns.Command(commands =&gt;
                {
                    commands.Edit(); // The "edit" command will edit and update data items
                    commands.Destroy(); // The "destroy" command removes data items
                }).Title("Commands").Width(200);
            })
            .ToolBar(toolbar =&gt; toolbar.Create()) // The "create" command adds new data items
            .Editable(editable =&gt; editable.Mode(GridEditMode.InLine)) // Use inline editing mode
            .DataSource(dataSource =&gt;
                dataSource.Ajax()
                  .Model(model =&gt;
                  {
                      model.Id(student =&gt; student.StudentNumber); // Specify the property which is the unique identifier of the model
                  //    model.Field(student =&gt; student.StudentNumber).Editable(false); // Make the studentID property not editable
  
                //      model.Field(p =&gt; p.CustomerNames).DefaultValue(
                 //         ViewData["defaultCategory"] as KendoGridAjaxEditing2.Models.CustomerNamesViewModel);
  
  
                  })
                      .Create(create =&gt; create.Action("BoardingPoints_Create", "Student")) // Action invoked when the user saves a new data item
                      .Read(read =&gt; read.Action("BoardingPoints_Read", "Student"))  // Action invoked when the grid needs data
                      .Update(update =&gt; update.Action("BoardingPoints_Update", "Student"))  // Action invoked when the user saves an updated data item
                      .Destroy(destroy =&gt; destroy.Action("BoardingPoints_Destroy", "Student")) // Action invoked when the user removes a data item
            )
            .Pageable()
  
  %&gt;
  
  
   public ActionResult students_Read([DataSourceRequest] DataSourceRequest request)
          {
                _studNum = HttpContext.Session["StudentNumber"].ToString();
  
  
              return Json(StudentRepository.GetSchoolYear(_studNum).ToDataSourceResult(request));
          }
  
  
  
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult students_Create([DataSourceRequest]DataSourceRequest request, StudentsViewModel students)
          {
              var results = new List&lt;StudentsViewModel&gt;();
  
              if (students != null )//&amp;&amp; ModelState.IsValid)
              {
                     _studNum = HttpContext.Session["StudentNumber"].ToString();
                  StudentRepository.InsertSchoolYear(students, _studNum);
                  results.Add(students);
  
              }
  
              return Json(results.ToDataSourceResult(request, ModelState));
          }
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult students_Update([DataSourceRequest]DataSourceRequest request, StudentsViewModel students)
          {
              if (students != null)
              {
  
                  _studNum = HttpContext.Session["StudentNumber"].ToString();
  
                  StudentRepository.UpdateSchoolYear(students);
                  UpdateModel(students);
  
  
  
  
              }
              return Json(new[] { students }.ToDataSourceResult(request, ModelState));
          }
  
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult students_Destroy([DataSourceRequest]DataSourceRequest request, StudentsViewModel product)
          {
              _studNum = HttpContext.Session["StudentNumber"].ToString();
  
              StudentRepository.DeleteSchoolYear(product);
  
  
  
              return Json(new[] { product }.ToDataSourceResult(request, ModelState));
          }
          private void PopulateStudents()
          {
              var dataContext = new SSTSDBDataModelDataContext();
              var categories = dataContext.tblMasterStudents
                          .Select(c =&gt; new StudentsViewModel
                          {
                              StudentNumber = c.StudentNumber
                              // StudentNumber=categories
                              // StudentNumber=categories.
                          })
                          .OrderBy(e =&gt; e.StudentNumber);
              ViewData["students"] = categories;
              ViewData["defaultCategory"] = categories.First();
          }
          public JsonResult GetPrsoducts(string text)
          {
              var northwind = new SSTSDBDataModelDataContext();
  
  
              var products = northwind.tblMasterStudents.Select(product =&gt; new StudentsViewModel
              {
                  StudentNumber = product.StudentNumber
              });
  
              if (!string.IsNullOrEmpty(text))
              {
                  products = products.Where(p =&gt; p.StudentNumber.Contains(text));
              }
  
              return Json(products, JsonRequestBehavior.AllowGet);
          }
  
  
  
          public ActionResult BoardingPoints_Read([DataSourceRequest] DataSourceRequest request)
          {
              _studNum = HttpContext.Session["StudentNumber"].ToString();
  
  
              return Json(StudentRepository.GetSBoardingPoint(_studNum).ToDataSourceResult(request));
          }
  
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult BoardingPoints_Create([DataSourceRequest]DataSourceRequest request, StudentsViewModel students)
          {
              var results = new List&lt;StudentsViewModel&gt;();
  
              if (students != null )
              {
                    _studNum = HttpContext.Session["StudentNumber"].ToString();
                  StudentRepository.InsertBoardingPoint(students, _studNum);
                  results.Add(students);
  
              }
  
              return Json(results.ToDataSourceResult(request, ModelState));
          }
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult BoardingPoints_Update([DataSourceRequest]DataSourceRequest request, StudentsViewModel students)
          {
              if (students != null )
              {
                  _studNum = HttpContext.Session["StudentNumber"].ToString();
  
  
                  StudentRepository.UpdateBoardingPoint(students);
                  UpdateModel(students);
  
  
  
  
              }
              return Json(new[] { students }.ToDataSourceResult(request, ModelState));
          }
  
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult BoardingPoints_Destroy([DataSourceRequest]DataSourceRequest request, StudentsViewModel product)
          {
  
              _studNum = HttpContext.Session["StudentNumber"].ToString();
              StudentRepository.DeleteBoardingPoint(product);
  
  
  
              return Json(new[] { product }.ToDataSourceResult(request, ModelState));
          }
  
  
          //  public tblMasterStudent _stud { get; set; }
  }
  </code></pre>