PDA

View Full Version : [CLOSED] GridDragDrop with ContainerScroll



Arbee
Jul 21, 2014, 8:51 PM
I have a problem trying to get drag and drop scrolling working in our ext.net web application.

Desired behavior: When dragging a gridpanel item around the grid panel, dragging to the top and the bottom should scroll through the items up and down respectively.

Problematic behavior: Dragging an item to the bottom scrolls the panel items down as expected however dragging an item to the top also scrolls the items down.

The panel should scroll up when dragging to the top instead of scrolling down.

ContainerScroll (on line 136) is the attribute I'm wondering about. Without it drag and drop scrolling doesn't work but with it drag and drop scrolling is acting strangely.

I created a test page really quickly to reproduce the issue.


<%@ 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)
{
this.BindData();
}
}

protected void MyData_Refresh(object sender, StoreReadDataEventArgs e)
{
this.BindData();
}

private void BindData()
{
Store store = this.GridPanel1.GetStore();

store.DataSource = this.Data;
store.DataBind();
}

private object[] Data
{
get
{
DateTime now = DateTime.Now;

return new object[]
{
new object[] { "a" },
new object[] { "b" },
new object[] { "c" },
new object[] { "d" },
new object[] { "e" },
new object[] { "f" },
new object[] { "g" },
new object[] { "h" },
new object[] { "i" },
new object[] { "j" },
new object[] { "k" },
new object[] { "l" },
new object[] { "m" },
new object[] { "n" },
new object[] { "o" },
new object[] { "p" },
new object[] { "q" },
new object[] { "r" },
new object[] { "s" },
new object[] { "t" },
new object[] { "u" },
new object[] { "v" },
new object[] { "w" },
new object[] { "x" },
new object[] { "y" },
new object[] { "z" },
new object[] { "aa" },
new object[] { "bb" },
new object[] { "cc" },
new object[] { "dd" },
new object[] { "ee" },
new object[] { "ff" },
new object[] { "gg" },
new object[] { "hh" },
new object[] { "ii" },
new object[] { "jj" },
new object[] { "kk" },
new object[] { "ll" },
new object[] { "mm" },
new object[] { "nn" },
new object[] { "oo" },
new object[] { "pp" },
new object[] { "qq" },
new object[] { "rr" },
new object[] { "ss" },
new object[] { "tt" },
new object[] { "uu" },
new object[] { "vv" },
new object[] { "ww" },
new object[] { "xx" },
new object[] { "yy" },
new object[] { "zz" }
};
}
}
</script>

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
<title>Test page for dnd scrolling issue</title>
<link href="/resources/css/examples.css" rel="stylesheet" />

<script>
Ext.dd.ScrollManager.vthresh = 50;
</script>
</head>
<body style="margin: 5px;">
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />

<ext:GridPanel
ID="GridPanel1"
runat="server"
Width="700"
Height="500"
AutoScroll="true">
<Store>
<ext:Store ID="Store1" runat="server" OnReadData="MyData_Refresh" PageSize="10">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="row" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="35" />
<ext:Column ID="Column1" runat="server" Text="Row" DataIndex="row" Flex="1" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Multi" />
</SelectionModel>
<View>
<ext:GridView ID="GridView1" runat="server" StripeRows="true">
<Plugins>
<ext:GridDragDrop ID="GridDragDrop1" runat="server" DragText="{0} selected group{1}" DDGroup="ConfigDD" ContainerScroll="true" />
</Plugins>
</ext:GridView>
</View>
</ext:GridPanel>
</form>
</body>
</html>

Daniil
Jul 22, 2014, 2:56 PM
Hi @Arbee,

Thank you for the report. It is a known Issue.
https://github.com/extnet/Ext.NET/issues/334

I've just fixed it in the trunk, revision #5919.

It will go to the v2.5.3 release.

Arbee
Aug 27, 2014, 6:32 PM
Is there a release date for 2.5.3 ?

Daniil
Aug 28, 2014, 8:12 AM
Hi @Arbee,

There is the following information here:
http://www.ext.net/download/


The next public release of Ext.NET will be v2.5.3.
No official release date is available.

It is still actual. Probably, the release will happen this year. Unfortunately, no more information I could provide you with.

You can use the Ext.NET sources from SVN. It contains all the fixes.