PDA

View Full Version : EXT-JS 4.2.1 retain the current Position of scrollbar of form - panel



rakesh.mmp
28 Jan 2015, 11:38 PM
I am trying to retain the position of the scrollbar in formpanel to show after form refresh .
But i am unable to find any solution.Please help me by suggesting solution for this.


Thanks & Regards
Rakesh

Jad
29 Jan 2015, 5:32 AM
Hi

Maybe try with the form field focus ?

Gary Schlosberg
29 Jan 2015, 6:05 AM
I don't know of any built-in or easy way of doing this, as with a grid. Please consider sharing if you manage to get this working.

Jad
29 Jan 2015, 6:15 AM
var form = Ext.create('Ext.form.Panel', {
items: [
...
{
xtype: 'textfield',
listeners: { focus: function (field) { form.scroll_pos = field }}
}
...
]
refreshForm: function () {
// your code
form.scroll_pos.focus();
}
});