Cannot read properties of null (reading 'id') TypeError: Cannot read properties of null (reading 'id') at NormalEdit.clickHandler (http://localhost:3000/static/js/bundle.js:96998:338) at Observer.notify (http://localhost:3000/static/js/bundle.js:28256:21) at Component.notify (http://localhost:3000/static/js/bundle.js:21704:26) at Grid.mou
seClickHandler (http://localhost:3000/static/js/bundle.js:111154:10)
field property for the grid columns. Consequently, the grid initially displays empty records. To enable CRUD operations, the editing feature requires a primary key column. You need to define the primary key by setting isPrimaryKey to true in a specific column. Please ensure that after setting the field property, you designate a unique column of the grid as the primary key.this is my grid config and id is with isPrimaryKey , my function to delete works correctly and with edit i only need t redirect to other page with ID in uri but it give me id errors idk why because if i put id manually the error remains
Here example of record output
Hi Swadowmaster,
After reviewing the information provided, we have observed that there is a script issue when clicking the "Editar" button rendered in the command column of the Syncfusion Grid. It seems that you are only redirecting to a specified URL with the ID value upon clicking the command column button. We have created a simple sample that meets your requirements, and upon testing, we were unable to reproduce the reported script issue. When the button is clicked, it navigates to the specified URL without throwing any script error. Please review the attached sample and video demos for more details.
If you are still encountering an issue, please try to replicate it with the shared sample or provide a simple issue replication sample to validate it further.
Regards
Aishwarya R
Hi,
I test your sample and it works perfectly but i found on my code the problem is the line "editSettinngs" when i remove it the code works !! this is my code working i dont know why this line break the code
Attachment: syncfusionSample_27b6e8e2.zip
updated code removing in inject Edit problem solved!
this make error
Hi Swadowmaster,
You are experiencing a problem with redirecting the page when clicking the "Editar" button only when the editSettings are configured in the Grid. When the editSettings are removed, the page redirection works properly when clicking the button. Before we can provide a solution to the issue you are facing, we require some additional information for validation. Please provide the following details:
1. Bind the actionFailure event to the Grid and console log the arguments to inform us of any exceptions or errors in that event.
2. Ensure the console log for any script issues and please share a screenshot of them.
3. Share the version of the Syncfusion package you are currently using.
4. Since we are unable to replicate the issue on our end, please share a simple sample demonstrating the issue, or attempt to reproduce the issue with the provided sample. This will assist us in further validating the issue.
Providing these details will allow us to validate the issue and to provide a more effective solution.
Regards
Aishwarya R
Hi,
my problem solved removing Edit from Inject tag here is a video and i have this dependencies maybe it c
Hi Swadowmaster,
We were unable to replicate the issue, with or without the Edit module injected. Please refer to the attached sample. It appears that the issue only occurs at your sample level when navigating to another page upon command click. However, we are pleased to hear that the issue has been resolved on your end.
Please get back to us if you need any other assistance.
Regards
Aishwarya R