I have a custom popUp that contains : a form and a grid inside of a tabPanel,
i want to validate the form first, stay in the same popup then enable the grid and work with it
//RazorPage
@using (Html.BeginForm("PostWithForm", "OrdresTravailMecanique", FormMethod.Post))
{
@(Html.DevExtreme().Form<EditerOrdreTravailModel>()
.Items(items =>
{
....
//the validation button for the form
items.AddButton()
.HorizontalAlignment(HorizontalAlignment.Right)
.ButtonOptions(b => b.Text("Enregistrer")
.Type(ButtonType.Success)
.UseSubmitBehavior(true)
.OnClick("showTravauxTab")
);
})
)
@(Html.DevExtreme().TabPanel()
.ID("TravauxTab")
.Disabled(true)
.Items(items =>
{
//DataGridTemplate
items.Add()
.Title("Travaux")
.Template(new TemplateName("TachesOtAddGrid"));
})
)
}
//Controller
[HttpPost]
public async Task<IActionResult> PostWithForm(EditerOrdreTravailModel values)
{...}
Problem is : The submitBehaviourButton sends me to a diffrent view, so i can't work with the grid after submiting the form
question from:
https://stackoverflow.com/questions/65882347/devextreme-submit-form-to-controller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…