View Full Version : Reloading a single record droma grid

7 Mar 2013, 11:08 PM
I have a grid. How can I refresh a single record? My models have defind a load data. My store alse has a direct proxy. What i want that sometimes a single record would get his data from the server, and not he whole grid.

For example after I edit a row in a form i want my grid to reload only one row.

Info: I do not want to use the record from the form because that one is not the same model, but they do have the same id. I use ExtJS 4.1.1a

7 Mar 2013, 11:23 PM
Use the static Model.load(id,config) and in success callback update your record with the new data, then commit the changes,

Edit: then do grid.getView().refreshNode(rec_index).

8 Mar 2013, 12:04 PM
Donw that, but The row does not refresh. I want oly that row to refresh.

9 Mar 2013, 12:44 AM
don't complicate yourself, do grid.getView().refresh()

9 Mar 2013, 1:10 AM
I love keepin simple, but having 1000 celsl, half of them having special renderers makes me think twice before rendering the whole table.

9 Mar 2013, 2:17 AM
ah haven't noticed grid.getView().refreshNode() . Updated my first replay, to complete the answer to your question, and the code example here : http://vadimpopa.com/reload-a-single-record-and-refresh-its-extjs-grid-row/