PDA

View Full Version : [CLOSED] GridPanel CheckColumn does not retain the focus/viewport



RajivDutt
Jun 17, 2014, 1:24 PM
I am using a grid panel with the checkcolumn for selection.
When i get scroll bar on the grid and try to select the row in the bottom.
After clicking the checkbox on the last row, it scrolls up and the focus or viewport changes... the selected row does not stays in the view.

Please suggest, why its happening and how to control this behavior.

Thanks,
Rajiv Dutt

Daniil
Jun 17, 2014, 2:02 PM
Hi @RajivDutt,

I cannot reproduce. Tested with the latest Ext.NET in FireFox.

Example

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

<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[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", false },
new object[] { "test", 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">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="test1" />
<ext:ModelField Name="test2" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Test 1" DataIndex="test1" />
<ext:CheckColumn runat="server" Text="CheckColumn" DataIndex="test2" Editable="true" />
</Columns>
</ColumnModel>
</ext:GridPanel>
</form>
</body>
</html>