Sunday, 1 September 2013

ext.NET accordion is not working correctly (MVC)

ext.NET accordion is not working correctly (MVC)

Could someone please point me in the right direction here, I've spent
hours on this!
I am trying to create a West region Container that contains an image fixed
in height, with an accordion control below that takes up the rest of the
vertical space.
Every time I try this, the accordion control does not work properly. It
renders with the top node expanded, and all the other nodes jammed up
together (not at the bottom). Also, when you start using the accordion, it
just seems to stop reacting to user clicks completely. My suspicion is the
way I am laying out the control (I am new to ext.NET).
I have created a class that supplies to the view the ext.NET control. The
function that returns the West region returns an ext.NET Container.
ext.Image image = new ext.Image
{
ImageUrl = "~/resources/images/welcome-screens.png",
Height = 200,
};
ext.Container outer = new ext.Container
{
Border = true,
Region = ext.Region.West,
Width = 200,
Split = true
};
outer.Items.Add(image);
ext.Panel acc = new ext.Panel
{
Title = "ACCORDION PANEL",
Layout = ext.LayoutType.Accordion.ToString()
};
acc.Items.Add(new ext.Panel { Title = "TEST1", Items = { new
ext.Panel { Title = "a" }, new ext.Panel { Title = "b" } }
});
acc.Items.Add(new ext.Panel { Title = "TEST2", Items = { new
ext.Panel { Title = "c" } }});
acc.Items.Add(new ext.Panel { Title = "TEST3", Items = { new
ext.Panel { Title = "d" } }});
acc.Items.Add(new ext.Panel { Title = "TEST4", Items = { new
ext.Panel { Title = "e" } }});
acc.Items.Add(new ext.Panel { Title = "TEST5", Items = { new
ext.Panel { Title = "f" } } });
outer.Items.Add(acc);
Any pointers or advice would be really welcome. Thanks.

No comments:

Post a Comment