Apr 25, 2016, 6:57 PM
[CLOSED] Validation form
Hi!
I have code
But if I use
Why is this happening?
I use ext.net mvc 3.3
Thanks!
I have code
X.Window()
.ID("wndModule")
.Icon(Icon.Cog)
.Modal(true)
.Layout(LayoutType.Fit)
.Items(
X.FormPanel()
.ID("formModule")
.Layout(LayoutType.Form)
.Frame(true)
.Items(
X.TextField()
.AllowBlank(false)
.ID("text_moduleName")
.FieldLabel("Module name),
..... //and other
)
.Buttons(
X.Button()
.ID("btnUpdateModule")
.DirectEvents(de =>
{
de.Click.Before = "validationWindow";
de.Click.Url = Url.Action("UpdateModule");
de.Click.ExtraParams.Add(new Parameter { Name = "moduleId", Value = "#{hid_moduleId}.getValue()", Mode = ParameterMode.Raw });
})
)
)
var validationWindow = function () {
return this.up('form').isValid();
}
If I used function validationWindow
- it's workBut if I use
de.Click.Before = "this.up('form').isValid()"; - it's not worked
Why is this happening?
I use ext.net mvc 3.3
Thanks!
Last edited by fabricio.murta; Apr 27, 2016 at 3:10 PM.
Reason: [CLOSED]