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

Post All Gridview Data to Controller

5 Answers 496 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sofian
Top achievements
Rank 1
Sofian asked on 15 Oct 2014, 07:58 AM
Hi,
I purchased this product and I have some problems.
1. How to post all data in KendoGrid back to controller on button click? The button is html input button. Can anybody provide a very simple sample, please?
2. I also use client template for editing and deleting because I use custom pop up window. So, in each row there are two more columns for editing and deleting single row selected by user. Can I also send one complete row as Json format or single model to the controller? I have no idea how to do it.

Thanks in advance.

5 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 17 Oct 2014, 07:03 AM
Hello Sofian,

The Grid is not a form element and it cannot be simply submitted to the server. The Grid uses its own transport to send changes to the server, how to configure this is covered in our demos and documentation:

http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/ajax-editing

The only work-around to this has several limitations which are described here:

http://www.telerik.com/support/code-library/submit-form-containing-grid-along-with-other-input-elements

Regarding the second question - again if you are using the editing that the Grid/DataSource provides you can send just the changes that you made to the server.

Kind Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Sofian
Top achievements
Rank 1
answered on 19 Oct 2014, 01:33 PM
Hello Petur,
Thank you for the reply. I don't use DataSource for creating, editing and deleting (.Create, .Update, .Destroy), the DataSource is just for reading data from the controller/server. Instead, I use custom command because I have to show custom pop up window for editing and deleting.
I actually prefer using the Grid/DataSource for deleting than custom delete button if the delete confirmation can be replaced with KendoWindow. Can I change the delete confirmation with KendoWindow and still using Grid/DataSource (.Destroy)?
0
Accepted
Petur Subev
Telerik team
answered on 21 Oct 2014, 10:57 AM
Hello Sofian,

Customizing the delete confirmation dialog is not supported out-of-the-box, but you can use the work-around that we have shared in this code library article:

http://www.telerik.com/support/code-library/customize-the-delete-confirmation-dialog

Kind Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dave
Top achievements
Rank 1
answered on 30 Oct 2018, 08:20 PM

I'd like to POST the data from my grid back to the controller method along with other form input. Is this link still the solution and do the limitations still apply (if paging is enabled, only the current page posts):

http://www.telerik.com/support/code-library/submit-form-containing-grid-along-with-other-input-elements

 

0
Tsvetina
Telerik team
answered on 01 Nov 2018, 12:29 PM
Hello Dave,

Here is a slightly newer version of the example:
Post grid data with form

The idea and the limitations are the same, as listed in this example description:
  • All the items in the grid will be submitted (no matter if they are updated or not).
  • Only the items from the current page will be submitted.
  • Server operations must be disabled - ServerOperation(false).


Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Sofian
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Sofian
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or