如何水平滚动extjs 4网格 [英] how to scroll extjs 4 grid horizontally

查看:99
本文介绍了如何水平滚动extjs 4网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在负载下水平滚动网格的正确方法是什么.

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.

推荐答案

一种可能性是使用scrollByDeltaX.示例:

One possibility is to use scrollByDeltaX. Example:

viewready: function(){
    var c = this.columns[5];
    var p = c.getPosition();

    this.scrollByDeltaX(p[0]);
}

工作示例: http://jsfiddle.net/YRraU/2/

这篇关于如何水平滚动extjs 4网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆