PDA

View Full Version : Grid rownumberer always displaying '1' for all the newly added records in grid



netemp
28 Aug 2012, 1:00 AM
We are using Ext.grid.RowNumberer for displaying a number at each record in a grid.

We have a button 'ADD' using which user can add a new row in the grid (using row editor) at index 0 in the grid.

Now, the issue is, that the Row Numberer always displays '1' for all the newly added records!

Thus, is there any method through which the row numberer can be reloaded or updated so that the row number is correct after new records have been added?

Thanks for any help in advance.

PS: ExtJS version used 4.1

Zdeno
28 Aug 2012, 1:21 AM
Did you try refresh view after you add new row?


grid.getView().refresh();

netemp
28 Aug 2012, 1:42 AM
Did you try refresh view after you add new row?


grid.getView().refresh();

Thanks for sharing the solution Zdeno. Works all fine.