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

How does and MVC grid and datasource determine which CRUD methods to use

1 Answer 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 16 May 2018, 02:04 PM
How does an MVC grid, or it's datasource determine which controller methods to use when Creating, reading, updating and destroying data utilizing the datasource.sync() method?  I have a grid that that when sync is called, it is trying to use the update method on a new record which causes an error.  I can't figure out how to identify the new record to the grid and datasource so that it will use the create method instead.  Has anyone else experienced this issue?

1 Answer, 1 is accepted

Sort by
0
Casey
Top achievements
Rank 1
answered on 16 May 2018, 03:24 PM
Nevermind.  I found the isNew() and hasChanges() methods.
Tags
Grid
Asked by
Casey
Top achievements
Rank 1
Answers by
Casey
Top achievements
Rank 1
Share this question
or