Sep 05, 2013, 8:57 AM
[CLOSED] [MVC] ItemClickListeners not fire after show an hiddenPanel with accordion
Hi guys,
I have an accordion panel with 2 panels.
My first contains 2 gridPanel associated.
The first gridPanel has an itemClickListeners that bind the second gridPanel
My Second is a hide panel
When i click on item into second gridPanel, i show my hide panel.
After this, i can't fire my itemClickListeners in first panel.
TestView
I have an accordion panel with 2 panels.
My first contains 2 gridPanel associated.
The first gridPanel has an itemClickListeners that bind the second gridPanel
My Second is a hide panel
When i click on item into second gridPanel, i show my hide panel.
After this, i can't fire my itemClickListeners in first panel.
TestView
@using Ext.Net;
@using Ext.Net.MVC;
@model List<Categories>
@Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig)
<script type="text/javascript">
var testShowPanel = function () {
Ext.getCmp('PanelSite').show();
}
</script>
@(
Html.X().Viewport()
.Layout(LayoutType.Fit)
.Items(
Html.X().Panel()
.ID("AccordionPanel")
.Layout(LayoutType.Accordion)
.ButtonAlign(Alignment.Center)
.Items(
Html.X().Panel()
.ID("PanelSelection")
.Layout(LayoutType.HBox)
.Title("Selection"))
.Items
(
Html.X().GridPanel()
.Flex(1)
.HideHeaders(true)
.Listeners(p =>
{
p.ItemClick.Handler = "#{GrilleOutput}.bindStore(record.colonnesTest())";
})
.Store(Html.X().Store()
.Model(Html.X().Model()
.Name("ModelDashBoardCategory")
.IDProperty("Id")
.Fields(
new ModelField("Id", ModelFieldType.Int),
new ModelField("Group", ModelFieldType.String)
)
.Associations(p =>
{
p.Add(new HasManyAssociation()
{
Model = "testModel",
Name = "colonnesTest",
AssociationKey = "ProcedureParameters"
});
})
)
.Data(Model)
.AutoDataBind(true)
)
.ColumnModel(
Html.X().Column().Flex(1).DataIndex("Group")
),
Html.X().GridPanel()
.Flex(1)
.ID("GrilleOutput")
.HideHeaders(true)
.Store(Html.X().Store()
.Model(Html.X().Model()
.Name("testModel")
.IDProperty("Id")
.Fields(
new ModelField("Id", ModelFieldType.Int),
new ModelField("Name", ModelFieldType.String)
)
)
)
.ColumnModel(
Html.X().Column().Flex(1).DataIndex("Name")
)
.Listeners(p =>
{
p.ItemClick.Fn = "testShowPanel";
})
),
Html.X().Panel()
.ID("PanelSite")
.Title("SiteTitle"))
.Layout(LayoutType.Fit)
.Hidden(true)
)
.Buttons(
Html.X().Button()
.ID("ButStartConfig")
.Text("Lancer")
.Hidden(true)
)
)
)
Categories.cs public class Categories
{
private List<Parameters> _parameters = new List<Parameters>();
public int Id { get; set; }
public string Group { get; set; }
public List<Parameters> Parameters { get { return _parameters ; } set { _parameters = value; } }
}
Parameters.cspublic class Parameters
{
public int Id { get; set; }
public string Name { get; set; }
}
Regards
Last edited by Daniil; Sep 06, 2013 at 11:21 AM.
Reason: [CLOSED]