When batch update grid keep calling the action that I not

3 posts, 0 answers
  1. ITGF
    ITGF avatar
    2 posts
    Member since:
    Aug 2016

    Posted 08 Sep Link to this post

    Recently I met a issue that when I batch update my grid, and it's always call the action I not assign to ?  And I have no idea why the grid keep calling Index action when I press the save changes button. here is the code below, my update controller and action is IV21080W and SenToTurnkey. No matter what I change the action, the grid just keep calling Index action.  this issue just pendding me lots of days.

    .DataSource(dataSource => dataSource.Ajax().PageSize(15).Batch(true)
    .Events(events => { events.Error("IV21080WErrors"); events.RequestEnd("IV21080WCRUDevents"); })
    .Update("SentToTurnkey", "IV21080W")
    .Read("Read", "IV21080W").Filter(x => x.Add(z => z.INVOICEDATE).IsEqualTo(DateTime.Parse("2016/09/01")))
    .Model(model => { model.Id(m => m.KEY_NO); model.Field(m => m.errorType).Editable(false); model.Field(m => m.INVOICENUMBER).Editable(false); model.Field(m => m.INVOICEDATE).Editable(false); model.Field(m => m.INVOICETIME).Editable(false); model.Field(m => m.AMOUNT).Editable(false); model.Field(m => m.TAXAMOUNT).Editable(false); model.Field(m => m.TOTALAMOUNT).Editable(false); })
    )
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .AutoBind(true)
    .Sortable()
    .Filterable()
    .Scrollable(s => s.Height("auto"))
    .Pageable(pageable => pageable.Refresh(false).PageSizes(false).ButtonCount(5))
    .ToolBar(toolbar => { toolbar.Excel(); toolbar.Save().SaveText("SentToTurnkey"); })
    .Excel(excel => excel.FileName("IV21080W.xlsx").Filterable(true).AllPages(true).ProxyURL(Url.Action("Save", "ILISFinPublic")))

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 13 Sep Link to this post

    Hi,

    The behavior you describe is rather strange. When you click the SaveChanges button the Update action should be triggered.

    Would you open the browser console by pressing F12 and see if there are any errors listed there? If there are any try to resolve them and see how the behavior changes.


    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. ITGF
    ITGF avatar
    2 posts
    Member since:
    Aug 2016

    Posted 13 Sep in reply to Viktor Tachev Link to this post

    we found the problem , the problem is model.Id(m => m.KEY_NO) , we make a mistake , controler put the all KEY_NO AS 0 , problem was fixed after we make a sequence for KEY_NO column. many thanks .
Back to Top