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

refreshing all rows updated after edit

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raymond E
Top achievements
Rank 1
Raymond E asked on 24 Jun 2014, 01:20 AM
I have  grid using ajax binding that I edit with a popup editor. When I edit a row I also update the data in rows related to the first.

Is it possible to refresh all of the updated rows without reloading all of the rows?

I've added the updated rows to the list that is returned by the update method but  that doesn't refresh the updated rows.

return Json(itemList.ToDataSourceResult(dsRequest));

If it's not possible what is the best way to parse the the response object returned by the grids datasource RequestEnd method? I would like to read one of the fields in the response.







1 Answer, 1 is accepted

Sort by
0
Raymond E
Top achievements
Rank 1
answered on 24 Jun 2014, 09:52 PM
I figured out how to access the data in the response passed from the data source's requestend event.
I thought I would post it here in case anyone else is trying to figure it out. The documentation regarding
the response object is really lacking.


function RequestEnd(evt) {
        if (evt.type === "update") {
            
            var str = kendo.stringify(evt.response);
            try {
                var obj = JSON.parse(str);
                if (obj.Data[0].BasePartNumber != "") {//Data contains an array of they type bound returned from the controller.
                    evt.sender.read();
                }
                
            } catch (err) {
                alert("error parsing json after update");
            }
            
            
            
        }
    }
Tags
Grid
Asked by
Raymond E
Top achievements
Rank 1
Answers by
Raymond E
Top achievements
Rank 1
Share this question
or