PDA

View Full Version : [CLOSED] Buffer issue when refreshing tree



RCN
Feb 09, 2015, 6:51 PM
On the following example
http://forums.ext.net/attachment.php?attachmentid=20681&stc=1

Scroll down to the middle of the height, and then, click on Refresh Button
http://forums.ext.net/attachment.php?attachmentid=20691&stc=1

Items's rendering fails
http://forums.ext.net/attachment.php?attachmentid=20701&stc=1

Even if you scroll to the top
http://forums.ext.net/attachment.php?attachmentid=20711&stc=1

Related issue: http://forums.ext.net/showthread.php?51621

Thanks in advance.



<!DOCTYPE html>
<html>
<head runat="server">
<script type="text/javascript">
var Refresh = function () {
App._trp.getRootNode().reload();
}
</script>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:TreePanel ID="_trp" Title="Ext.Net" RootVisible="false" Height="300" Width="500" runat="server">
<Store>
<ext:TreeStore runat="server">
<Proxy>
<ext:AjaxProxy Url="~/Example/LoadTreeFakeChildren">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="data" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Name" />
<ext:ModelField Name="Identifier" />
</Fields>
</ext:Model>
</Model>
</ext:TreeStore>
</Store>
<Root>
<ext:Node NodeID="0" Text="Root" />
</Root>
<ColumnModel>
<Columns>
<ext:TreeColumn Text="Name" DataIndex="Name" Flex="2" runat="server" />
<ext:Column Text="Identifier" DataIndex="Identifier" runat="server" />
</Columns>
</ColumnModel>
<Buttons>
<ext:Button Text="Refresh" runat="server">
<Listeners>
<Click Handler="Refresh();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:TreePanel>
</body>
</html>




namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Index()
{
return View();
}

public StoreResult LoadTreeFakeChildren()
{
NodeCollection nodes = new NodeCollection(false);

for (int index = 1; index < 300; index++)
{
Node node = new Node
{
NodeID = index.ToString(),
Leaf = true
};
node.CustomAttributes.Add(new ConfigItem { Name = "Name", Value = node.NodeID, Mode = ParameterMode.Value });
node.CustomAttributes.Add(new ConfigItem { Name = "Identifier", Value = Guid.NewGuid().ToString(), Mode = ParameterMode.Value });

nodes.Add(node);
}

return new StoreResult { Data = nodes.ToJson() };
}
}
}

Daniil
Feb 10, 2015, 5:05 AM
Hi Raphael,

Thank you for the report!

I would rather tread it as the same issue rather than a related one:) Answered in the original thread.
http://forums.ext.net/showthread.php?51621&p=246821&viewfull=1#post246821

RCN
Feb 10, 2015, 11:45 AM
Thank you Daniil

Daniil
Jun 26, 2015, 8:20 AM
The issue has been fixed with ExtJS 5.1.1 upgrade. It goes to the upcoming Ext.NET 3.2.0 release.