Jul 09, 2012, 1:43 AM
Listeners with MVC3
Hi everybody
Now I can write with MVC3 like this
give me same sample?
thanks
Now I can write with MVC3 like this
.Listeners(itemlsn =>
{
itemlsn.ItemClick.Handler = "if (record.data.leaf || record.data.id=='s_root') { e.stopEvent(); loadPage(#{pnlMain}, record); }";
})
but i want to write like thisitem.Add(Html.X().Panel()
.Layout(LayoutType.Border)
.Region(Region.Center)
.Items(itemMain =>
{
itemMain.Add(Html.X().TabPanel()
.Region(Region.Center)
.Layout(LayoutType.Border)
.ID("pnlMain")
.TopBar(topBar =>
{
topBar.Add(Html.X().Toolbar()
.Flat(true)
.Items(toolBar =>
{
toolBar.Add(new Button { Icon = Icon.PageWord, Text = "Load", Listeners = {How to write????} });
toolBar.Add(new Button { Icon = Icon.PageWhiteWord, Text = "Clean" });
toolBar.Add(new ToolbarSeparator());
toolBar.Add(new Button { Icon = Icon.Accept, Text = "Save", Weight = 200 });
toolBar.Add(new ToolbarFill());
toolBar.Add(new Button { Icon = Icon.Printer, Text = "Print", Weight = 100, X = 100 });
}));
}));
}));
when the button click I want submit the form page and my page like this@model Test1.Models.WordViewModel
@{
Layout = null;
int i = 0;
}
<!DOCTYPE html>
<html>
<head>
<title>Section_root</title>
</head>
<body>
<div>
<form method="post" target="_self" action="@(Url.Action("SaveData", "Home"))">
@Html.X().ResourceManager()
@(Html.X().FormPanel()
.ID("s_root")
.Items(itemForm =>
{
itemForm.Add(new TextField
{
FieldLabel = "title",
AnchorHorizontal = "61%",
Name = "WBody[" + @i + "].F_VALUE",
Value = @Model.WBody[i++].F_VALUE
});
}))
</form>
</div>
</body>
</html>
how to write with Listeners give me same sample?
thanks
Last edited by zhdl; Jul 09, 2012 at 2:11 AM.