How to Obtain Edited Grid Cell Value In Javascript

Thread ID:

Created:

Updated:

Platform:

Replies:

I am using a grid in batch edit mode (that supports filtering and grouping) and I am trying to access the value of a boolean column in javascript. If the user modifies the value I still only see the original value.

var gridInstance = $("#Grid").ejGrid("instance");var data = $("#Grid").ejGrid("getCurrentViewData");for (var i = 0; i < data.length; i++) { // this next line appears to be returning the original value - and not the value as modified by the user if (data[i].IncludeInReallocation) { // do stuff }}

What I am trying to do is to allow the user to apply an operation to selected/checked rows in the grid. There is logic in the controller which is pre-selecting rows that need to be acted on (on the web page - the user can still check/uncheck rows as desired).

Your solution didn't quite get to what I was looking for. I was able to accomplish this by using: gridInstance._bulkEditCellDetails._data;This appears to give me access to the filtered rows and to the data that either was returned from the server or, if the user has entered data then it provides the data entered by the user.

var gridInstance = $("#Grid").ejGrid("instance");

// the following line appears to provide access to the data that has & has not been edited by the user

From the query “access to the filtered rows”, we suspect that you need to access the filtered data with bulk edited details. As per your code example, we can access the filtered data in current page but can’t get the data from the other pages.

If the above scenario is your requirement, then the mentioned code example can be used.

Else please let us know, if the requirement is to access all the filtered data at a time.

Provide above details which will help to analyze the requirement and provide a solution response as early as possible.