This is a migrated thread and some comments may be shown as answers.

When batch update grid keep calling the action that I not

2 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ITGF
Top achievements
Rank 1
ITGF asked on 08 Sep 2016, 05:57 AM

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 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 13 Sep 2016, 06:39 AM
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
0
ITGF
Top achievements
Rank 1
answered on 13 Sep 2016, 07:56 AM
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 .
Tags
Grid
Asked by
ITGF
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
ITGF
Top achievements
Rank 1
Share this question
or