We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Submit Selected Grid Rows To Server

Thread ID:





131352 Jul 6,2017 04:59 AM UTC Jul 7,2017 12:12 PM UTC ASP.NET Core 1
Tags: Grid
Zhen Liu
Asked On July 6, 2017 04:59 AM UTC

I have a grid which allows multi row selection, how can I submit user selections to the server with a button press?

Venkatesh Ayothi Raman [Syncfusion]
Replied On July 7, 2017 12:12 PM UTC

Hi Zhen, 
Thanks for contacting Syncfusion support. 
In button click , we suggest you to use getSeletedRecords method of ejGrid to get the selected records in Grid and then we need to pass selected records using ajax. Please refer to the below help document and code example.  
Code example: 
<ej-Button ID="refresh" Type="Button" Text="selectedReocds" click="Click" /> 
<ej-grid id="FlatGrid" allow-sorting="true" allow-paging="true" allow-reordering="true" selectiontype="Multiple"> 
. . . 
    <e-datamanager  url="/Home/DataSource" update-url="/Home/Edit" insert-url="/Home/Create" remove-url="/Home/Delete" adaptor="UrlAdaptor" /> 
        . . . 
<script type="text/javascript"> 
    function Click() { 
        var obj = $(".e-grid").ejGrid("instance"); 
        var data = obj.getSelectedRecords(); 
            type: "POST", 
            //send the selected records to server side while button click 
            url: "Home/SelectedRecords", 
            datatype: "json", 
            contentType: "application/json; charset=utf-8", 
            data: JSON.stringify({ Grid1Data: JSON.stringify(data) }), 
            success: function (result) { 
Please let us know if you have any further assistance on this. 

Venkatesh Ayothiraman. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon