View Full Version : [CLOSED] GridPanel scrolls document when getting focus

Mar 13, 2013, 11:38 AM

We are having a problem with a GridPanel. The thing is, when you click on the GridPanel, and it takes focus, the document is automatically scrolled to leave the GridPanel at the top, losing view of the items in top of the GridPanel. We would like to avoid this.

Is there a way to avoid the GridPanel from moving the scroll of the page?

Mar 13, 2013, 12:03 PM
Hi @FVNoel,

Please provide a test case to reproduce.

Mar 13, 2013, 12:45 PM
Here is a example:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test.aspx.vb" Inherits="JSSR.Test.PilotoExtNet.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

<script type="text/javascript">

function loadData() {
setTimeout(function () {
var data = [];
for (var i = 0; i < 1000; ++i) {
data.push({ Id: i + 1, Test: 'Hello ' + (i + 1).toString() });
}, 100);


<form id="form1" runat="server">
<ext:ResourceManager runat="server">

<ext:Viewport runat="server" Layout="FitLayout">
<ext:Panel runat="server" Region="Center" Layout="FormLayout" AutoScroll="true">
<ext:Label ID="Label1" runat="server" Text="LABEL" />
<ext:Label ID="Label2" runat="server" Text="LABEL" />
<ext:Label ID="Label3" runat="server" Text="LABEL" />
<ext:Label ID="Label4" runat="server" Text="LABEL" />
<ext:Label ID="Label5" runat="server" Text="LABEL" />
<ext:Label ID="Label6" runat="server" Text="LABEL" />
<ext:Label ID="Label7" runat="server" Text="LABEL" />
<ext:Label ID="Label8" runat="server" Text="LABEL" />
<ext:Label ID="Label9" runat="server" Text="LABEL" />
<ext:Label ID="Label10" runat="server" Text="LABEL" />
<ext:GridPanel runat="server">
<ext:Store ID="Store1" runat="server" AutoDataBind="true" ClientIDMode="Static">
<ext:Model ID="Model1" runat="server">
<ext:ModelField Name="Id" />
<ext:ModelField Name="Test" />
<ext:ArrayReader IDProperty="Id" />
<ext:Column runat="server" ID="colId" DataIndex="Id" Text="Id" />
<ext:Column runat="server" ID="colTest" DataIndex="Test" Text="Test" />
<ext:GridView LoadMask="true" LoadingCls="Loading..." />
<ext:CellSelectionModel />
<AfterRender Handler="loadData();" />


Before clicking in the grid, we can see the following:

But when we click on a grid cell, the Grid automatically scrolls to the top of the document:


Losing view of the Labels.

We would like the document not to be scrolled at all when you click on a cell.

Mar 13, 2013, 3:58 PM
Thank you.

It doesn't scrolls for me.

What are a browser and Ext.NET version?

Mar 13, 2013, 4:06 PM

Mar 13, 2013, 4:26 PM

Unfortunately, it doesn't provide enough information to conclude what Ext.NET you are actually using.

What is a place where you got it?

Mar 13, 2013, 5:09 PM
We have downloaded the Ext.NET libraries from the following URL:


from the link: Assemblies (.dll) only -> https://github.com/downloads/extnet/Ext.NET.Pro/Ext.NET.WebForms.Pro.2.1.1.zip

We are using the framework 4.0 version.

Mar 13, 2013, 11:39 PM

It's known bug in ExtJS: http://www.sencha.com/forum/showthread.php?133983 But it fixed now.

Unfortunately, there is no workaround for CellSelectionModel only for RowSelectionModel. But we can investigate it more or you can wait until Ext.NET will migrate to ExtJS 4.2?

Mar 14, 2013, 5:03 AM
Yes, it is not reproducible with the Ext.NET sources from the SVN trunk.

ExtJS 4.2.0 final was just released. So, it takes a little time to release Ext.NET v2.2. It might happen next week.

Mar 14, 2013, 8:44 AM
We will wait for the 2.2 release then. Thank you for your reply.