Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
Hello! All,
I have created an ASP.Net MVC 4 application for basic CRUD operations by following this article
[^].

After this I have implemented the Kendo UI Grid, the Edit Functionality works great but when I try to delete the row, I'm getting the following error:

Quote:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int64' for method 'System.Web.Mvc.ActionResult Delete(Int64)' in 'Skydentech.Controllers.EHRController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters


If I remove the Kendo Grid and move back to the original stuff it works perfect. How can I implement delete functionality which works with Kendo Grid as well.

Thanks.
Posted
Comments
ZurdoDev 11-Jul-14 7:20am    
Fix the error. It is expecting an id but you aren't giving it one.
Nischal Bhatt 11-Jul-14 7:58am    
hey! RayDev,
I've already specified the Id as a parameter.
ZurdoDev 11-Jul-14 8:01am    
Somewhere it is not right. Perhaps refer to http://stackoverflow.com/questions/2500021/the-parameters-dictionary-contains-a-null-entry-for-parameter-how-to-fix
[no name] 21-Jul-14 1:57am    
Yes there is simply a null check error. You havespecified but the Id might not be getting assigned with any value in the Kendo grid please debug and check.

1 solution

Your application attempts to delete an item but it cant pass the id for that item to delete. Try something like new{id=Model.ID} on the delete view. The ID depends on what you named yours in ur application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900