Grid Destory command passing null to controller

0 Answers 84 Views
Grid
Guest10
Top achievements
Rank 1
Guest10 asked on 12 Jul 2023, 01:39 AM

My Grid has the following code

 

.DataSource(dataSource => dataSource
                            .Ajax()
                            .AutoSync(false)
                            .Model(model => model.Id(p => p.No))
                            .Destroy(update => update.Action("DeleteData", "DataController"))
                            .Events(evt => evt.Error("cancelDelete"))

 

Following is the controller

 [HttpPost]
        public ActionResult DeleteData([DataSourceRequest] DataSourceRequest request, Datamodel data)
        {

 

I see data has null when it call the controller function

 

What could be the reason for data is null and the No is not passed.

 

Thanks

 

Anton Mironov
Telerik team
commented on 14 Jul 2023, 01:33 PM

Hi Chakrapani,

Thank you for the code snippets and details provided.

The fastest route to getting you up and running is if you could provide a runnable, isolated, sample project. Examining this project will let us replicate the issue locally and further troubleshoot it.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Guest10
Top achievements
Rank 1
Share this question
or