tags:

views:

30

answers:

1

Hello guys.

I have a grid(gridpanel) and data in it which I read from json query. After I added new bussines object(row) - I send him in json format to server, write to DB, and reload all grid. How I can focus on currently added row(b/o) after that? I will be very cool if I return added id at the json answer and grid take it and focus on row with added id. Thx.

+1  A: 

How is your data being added (append-mode or not?). You can do grid_panel.getView().focusRow(row) on the length of the data array in the store, which will focus on the "last" row that was inserted. Also, you could hook into the rowsinserted event of GridView, and focusRow on the lastRow parameter that's passed in there.

Kenny Peng
no - i havent append mode (this is big trouble).
0dd_b1t