.DataKeys(key => key.Add(row => row.ResourceIidKey)) .DataBinding(db => db.Ajax() .Select("SelectNexusResourcesForEdit", PdsController) .Insert("InsertNexusResource", PdsController) .Update("UpdateNexusResource", PdsController) .Delete("DeleteNexusResource", PdsController) )I had success following the pattern explained in the Telerik Help documents for AJAX editing which used the route with optional id parameter and matching id parameter in the action methods for update and delete.
I then attempted to discover whether there was something "magic" (required?, hidden?) about the use of the id parameter. So I changed the id parameter in the route and in the action methods to use a myResourceId parameter. It worked fine without problem for the update method. But NOT for the delete method.
I tried a lot of different approaches to get the delete method to work using my own choice of parameter (the "myResourceId" instead of the "id") and never found a way to get it to work for the delete method. In my opinion, this discrepancy between being able to choose my own parameter for the update method (where it worked great) but not for the delete method (where it failed no matter what I tried) represents a definite form of bug... because this kind of inconsistency (within the MVC paradigm that promotes convention and consistency) causes confusion for developers.... and I lost a lot of time trying to figure this one out.
I hope that Telerik will be able to confirm this inconsistency and eliminate it from the grid. Meanwhile, I will use the "id" parameter for the delete methods. But then to maintain consistency with my update methods, I will also have to use the "id" parameter there as well.
Now as for the reason why I wanted to change the name of the id parameter. That's because I am using nested grids in a hierarchy, and I wanted greater clarity about which id for which level of the hierarchy...
so this whole problem remains to be solved... and it would be nice to see a working demo of a hierarchical grid with AJAX binding where the developer can use their own choice of key parameters that can be used in the routes and action methods for update/delete for each level of the hierarchy.