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

Configure routeValues on Destroy is calling Create

2 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 06 Aug 2018, 01:32 PM

I have a grid with a custom command column for delete. I have also configured the Destroy method using additional parameters which is supported

.Destroy("DeleteAction", "MyController", new { extraId = Model.Id })

I should mention that the Create function is not defined since I am not going to use it.

When I press the button I was getting nothing. After attaching to the error event I got an exception with Not Found. After further investigation I saw that instead of calling Destroy method it was calling Create. I define also the Create and confirmed that the telerik grid on delete button was calling create method.

Since Destroy does not support the parameter routeValues why is it available?

2 Answers, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 06 Aug 2018, 01:41 PM
Sorry about this post. I found the problem. I forgot to configure the Model. 
0
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 06 Aug 2018, 01:41 PM
Sorry about this post. I found the problem. I forgot to configure the Model. 
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or