PDA

View Full Version : [CLOSED] Scrolled (grouped) grid and checkbox selection causes scroll to top



ATLAS
Jun 25, 2013, 9:11 AM
I have a grouped grid of 1030 rows (somewhere between 20 and 60 rows in a group) in 18 groups, loaded as a single page into a "bin" based store. The grid has 4 colums with one being a CheckColumn. Grouping is started colapsed. If I expand a group and select a checkbox where no scrolling has occurred, the checkbox changes state as it should. If I scroll to reveal checkboxes in the group that outwith the display area of the grid and select a checkbox, the check changes state, but the grid then scrolls to the top. This is very frustrating!

Daniil
Jun 25, 2013, 12:14 PM
Hi @ATLAS,

I cannot reproduce it using the test case below. If you can, please provide exact steps. If you cannot, please modify the sample to get the issue reproducible.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Store store = this.GridPanel1.GetStore();
store.DataSource = new object[]
{
new object[] { "group1", "1", true },
new object[] { "group1", "11", false },
new object[] { "group1", "111", true },
new object[] { "group2", "2", true },
new object[] { "group2", "22", false },
new object[] { "group2", "222", false }
};
}
}
</script>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:GridPanel ID="GridPanel1" runat="server" Height="100">
<Store>
<ext:Store runat="server" GroupField="groupId">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="groupId" />
<ext:ModelField Name="test1" />
<ext:ModelField Name="test2" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="GroupId" DataIndex="groupId" />
<ext:Column runat="server" Text="Test1" DataIndex="test1" />
<ext:CheckColumn runat="server" Text="Test2" DataIndex="test2" Editable="true" />
</Columns>
</ColumnModel>
<Features>
<ext:Grouping runat="server" StartCollapsed="true" />
</Features>
</ext:GridPanel>
</form>
</body>
</html>