PDA

View Full Version : [CLOSED] GridPanel with BufferedRenderer: ScrollTo an added row



HansWapenaar
Jan 27, 2014, 12:41 PM
Hi,

Is it possible to scroll to a row in a buffered gridpanel which is just added and selected?
Idea is the following:
- fill a gridpanel with contents
- add a new row (formpanel with server side code)
- select the new row (server side code)
- scrollto this new row

The new row will not be added at the end of the gridpanel because the data is sorted on one of the fields.

The example http://examples2.ext.net/#/GridPanel/Infinite_Scrolling/Buffered_Scrolling/ shows how to jump to a row number. But I think that when adding a new row the row number is not known. Or is it possible to get the row number directly after adding a new row?

Hans Wapenaar

Daniil
Jan 27, 2014, 2:07 PM
Hi Hans,

Please demonstrate how you add a new record.

HansWapenaar
Jan 28, 2014, 8:39 AM
Hi Daniil,

In the application where i need this functionality a record is inserted with an insert query in the database table (query constructed in server-side code).
After this insertion i run a databind on the store to refresh the gridpanel:
gridpanel1.GetStore.DataBind()

Hans

Daniil
Jan 28, 2014, 10:59 AM
Ok. I think you have to find a way to determine an index of an inserted row on server when you actually insert that record. I mean accessing to a Store's data source directly.