-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
During row add, the dummy PK cannot be changed to a user-specified one #12091
Comments
I don't think we should allow changing the PK on rowEditStart or any other editing event. You can change the PK for the adding record in the Let me know if using the |
@ChronosSF, I agree with @MayaKirova and I have tested this with angular project and Entity Framework using SQLite.
This will make a request to the controller so that the row can be added to the database and return the newly created object with correct ID (Note that firstly the id is a negative number).
This way just before the row is added we change the rowID with the correct one which comes from the database. |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
Description
The most obvious way to support changing the dummy PK is by handling the rowEditStart event (if you don't want for the end-user to see the dummy negative numbers). However, changing the rowData from the event args like this throws an error.
Steps to reproduce
Expected result
The sample should either work or there should be a different mechanism to achieve this such as the generatePK event in jQuery.
Attachments
stoxrz--run.zip
The text was updated successfully, but these errors were encountered: