Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
AutoCommit not firing UpdateURL Action
posted

Version 2014.1

MVC 5

I have a a grid with updating enabled. I have AutoCommit enabled on the grid as well. however when I click the Done button when editing or adding or when I delete a row, I would expect the UpdateURL action to be executed but it is not.  According to the doumentation located at http://help.infragistics.com/Doc/jQuery/Current/CLR4.0?page=igGrid_Updating.html which reads "If autoCommit is enabled, the edit row actions trigger updates in the data source." it seems to indicate that when AutoCommit is enabled the UpdateURL action shoudl be fired.

here is the Helper

@(Html.Infragistics().Grid(Model)
.ID("contactGrid")
.PrimaryKey("ContactID")
.AutoGenerateColumns(false)
.Columns(columns =>
{
    columns.For(item => item.ContactDescription).HeaderText("Contact Description");
    columns.For(item => item.ContactID).Hidden(true);
})
     .Features(features =>
          {
              features.Sorting().FirstSortDirection("ascending").Mode(SortingMode.Single);
              features.Filtering().Mode(FilterMode.Advanced).FilterDropDownItemIcons(true);
              features.Paging()
                  .ShowPageSizeDropDown(true)
                  .PageSizeDropDownLocation("inpager")
                  .PageSizeList(new List<int> { 1020304050 })
                  .PageSize(10)
                  .FirstPageTooltip("Move to the First page")
                  .LastPageTooltip("Move to the Last Page");
              features.Updating()
                   .EditMode(GridEditMode.Row)
                   .EnableAddRow(true)
                   .EnableDeleteRow(true)
                   .ShowDoneCancelButtons(true)
                   .StartEditTriggers(GridStartEditTriggers.DblClick | GridStartEditTriggers.Click)
                   .ColumnSettings(settings =>
                   {
                       settings.ColumnSetting()
                           .ColumnKey("ContactDescription")
                           .EditorType(ColumnEditorType.Text)
                           .Required(true);
                       settings.ColumnSetting()
                           .ColumnKey("ContactId").ReadOnly(true);
                   });
          })
          .AutoCommit(true)
          .UpdateUrl(@Url.Action("UpdateContactOptions"))
          .DataSourceUrl(Url.Action("RetrieveContactOptions"))
          .DataBind()
      .Render())


I believe this is a bug. 


That said I am now attempting to turn off autoCommit and handling the various events to call saveChanges manually, however I need to know what events are the right ones to handle. I have event handlers rowAdded,editRowEnded,rowDeleted currently.  The issues I am having with these are as follows:

editRowEnded fires regardless of whether I click cancel or done,

when adding a new row both rowAdded and editRowEnded fire causing the UpdateURL to be hit twice.

I saw references to a rowUpdated event in some forum posts but cannot find that in any documentation.




Parents Reply Children
No Data