Thanks Shane! I think I've got it. http://plnkr.co/edit/f1EZvn?p=preview
That kinda sucks for larger objects though. But at least it's doable. Thanks! On Tuesday, June 10, 2014 4:37:19 PM UTC-5, Shane Walters wrote: > > Here's what I do in a similar scenario: > > 1. get the rows that might need changing from grid.options.data > 2. user changes the rows and persist to server > 3. Server call comes back with updated rows > 4. locate the rows in grid.options.data using something like row.entity.id > (whatever makes your row unique) > 5. update the properties of each row.entity with properties from server. > Don't just replace row.entity because ng-grid does not watch row.entity. > It watches row.entity.property. > > Hope it helps. > > -Shane > > On Tuesday, June 10, 2014 3:57:28 PM UTC-5, Brad McAlister wrote: >> >> I'm needing to click on a row in ng-grid, make some edits and replace a >> specific set of rows with the resulting data. Basically, when the user >> clicks on a row, I loop through and grab all the rows with a matching >> property in the object and push the index of each row into an array while a >> modal pops up. Then the user edits some data and saves it back to the >> server and the server sends back the new rows that should replace the rows >> that I have indexed in my array. I can update the row that's clicked on >> using row.entity but I can't figure out how to update the other rows. I'm >> open to any ideas. >> >> Here's a plunker: http://plnkr.co/edit/f1EZvn?p=preview >> > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
