Grid Update Mysteriously No Longer Works

2 posts, 0 answers
  1. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 03 Apr 2018 Link to this post

    I have a Grid, and I have it configured that if I double click a row, it opens an Edit Template.  Upon clicking Update, it would call into the MVC Action corresponding to the Update, and would process.  Today however, it is no longer working.  As far as I'm aware of the only change was to downgrade System.Web.Mvc from 5.2.4 to 5.2.3 because that's what the Kendo.Mvc required.

    Using CDN version 2018.1.117.

    Here is the code to the grid itself:

    @(Html.Kendo().Grid<ClaimsImport>()
          .AutoBind(false)
          .Name("importGrid")
          .Resizable(r => r.Columns(true))
          .Scrollable(s => s.Height("auto"))
          .Sortable()
          .Pageable()
          .Filterable(f => f.Enabled(true))
          .Groupable()
          .Selectable()
          .Events(ev =>
          {
              ev.DataBound("gridBound");
          })
          .Columns(cols =>
          {
              // using a double click to select & edit record cuz I hate how the Telerik Grid buttons look...
              // cols.Command(c => c.Edit().Text(" "));
              cols.ForeignKey(f => f.ImportStatus, (IEnumerable) ViewData["importStatus"], "Value", "Text").Width(150);
              cols.ForeignKey(f => f.Disposition, (IEnumerable) ViewData["dispositions"], "Value", "Text").Width(150);
              cols.Bound(c => c.ClaimId);
              cols.ForeignKey(f => f.ClaimAdminId, (IEnumerable) ViewData["claimAdmins"], "ClaimAdminId", "ClaimAdminName").Width(200);
              cols.Bound(c => c.Carrier);
              cols.Bound(c => c.ClaimNumber);
              cols.Bound(c => c.ClaimantSSN);
              cols.Bound(c => c.ClaimantName);
              cols.Bound(c => c.ClaimStatus);
              cols.Bound(c => c.CloseDate).Format("{0:d}");
              cols.Bound(c => c.DateOfInjury).Format("{0:d}");
              cols.Bound(c => c.Processed).ClientTemplate("#: Processed ? 'Yes' : 'No' #");
          })
          .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("ClaimImport").Window(w => w.Title("Edit Import Disposition").Width(700)))
          .DataSource(ds => ds
              .Ajax()
              .PageSize(100)
              .ServerOperation(true)
              .Read(r => r.Action("GetImportData", "Claims").Data("addLabelToRead").Type(HttpVerbs.Get))
              .Update(u => u.Action("SaveImportRecord", "Claims").Type(HttpVerbs.Post))
              .Events(ev =>
              {
                  ev.RequestEnd("requestEnd");
                  ev.RequestStart("requestStart");
                  ev.Error("errorHandler");
              })
              .Model(m =>
              {
                  m.Id(d => d.ID);
                  m.Field(d => d.Disposition);
                  m.Field(d => d.ClaimAdminId);
              })
          )
          .ToolBar(tb =>
          {
              tb.Custom().Text("Clear Filter").HtmlAttributes(new {id = "gridFilterReset", style = "float:right;"});
              tb.Custom().Text("Re-Run Claim Match").HtmlAttributes(new { id = "reRunClaimMatch", style = "float:left;" });
              tb.Custom().Text("Update Claim Financials").HtmlAttributes(new { id = "updateClaimFinancials", style = "float:left;" });
          }))

     

    Here's the appropriate MVC Action:

    public ActionResult SaveImportRecord([DataSourceRequest] DataSourceRequest request, ClaimsImport editedRec)
           {
               ClaimsImport thisRec = WebApiHelper.CallPostAPI<ClaimsImport, ClaimsImport>($"{_baseURL}{_monthEndPath}SaveImportRecord", editedRec);
               return Json(new[] {thisRec}.ToDataSourceResult(request));
           }

     

    I have put a break point in the MVC action, and it never gets called.  Never.  I've tried adding an extra javascript function call via the Updates .Data() method, and even it does not get called.  I really need some help with this.

    As I said, everything was fine up until today.  Any idea whatsoever about what might be happening.

  2. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 03 Apr 2018 Link to this post

    You can disregard this... One of my developers stepped up and told me there were some changes that were made to some data structures... Damn, I need to keep a tighter rein on them...
Back to Top