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

How to access the values in a grid from the template columns

Thread ID:





132441 Sep 1,2017 09:52 PM UTC Sep 5,2017 01:22 PM UTC ASP.NET Core 1
Tags: Grid
Asked On September 1, 2017 09:52 PM UTC

Hi Support:

I have a view with a grid.  The grid datasource is populated with a ViewBag.

The grid will display data that can only be edited.

Two columns are template columns.  The first is a checkbox and the other is an input box.  We decided to use templates because the checkbox should be clickable with a single click and the other template (input) is because is displayed only in certain rows.

Outside the grid there is a Save button.  The goal is that when the save button is clicked, the new data must be transferred to the server via ajax.

The problem is that I dont know how to read the values from the grid, because the dataSource property does not have the modifications.

Please help.

Thanks in advanced


Vignesh Natarajan [Syncfusion]
Replied On September 5, 2017 01:22 PM UTC

Hi David, 

Thanks for using Syncfusion products. 

We have analyzed your query. From your requirement ”checkbox should be clickable with a single click” so we suggest you to use batch editing with checkbox column to achieve your requirement. Please refer the below image for same 


We have prepared the sample based your requirement. 
Query2: “ I dont know how to read the values from the grid” 

              On the ej-Button’s click event we have taken the Grid Instance and called the batchsave() method, which will  call batch-url and update the modified data into database. Please refer below code snippet. 

<ej-button id="button_button" text="Save" show-rounded-corner="true" size="Mini" type="Button"> 
<script type="text/javascript"> 
        $("#button_button").click(function () { 
            var gud = $("#FlatGrid").ejGrid("instance"); //Grid instance 
            gud.batchSave(); // calling the batcsave method 
Please refer our online documentation for your reference 

Vignesh Natarajan 


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