Reputation: 173
What is the proper way to scroll a grid horizontally on load.
I want to scroll to a particular grid column on load.
I can focus the column I want using this:
dataStore.on('load', function() {
var cl = dataGrid.columns[43];
cl.focus();
});
but the grid does not scroll when I do this.
Upvotes: 2
Views: 2443
Reputation: 16140
One possibility is to use scrollByDeltaX
. Example:
viewready: function(){
var c = this.columns[5];
var p = c.getPosition();
this.scrollByDeltaX(p[0]);
}
Working sample: http://jsfiddle.net/YRraU/2/
Upvotes: 2