Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 enter image description here

//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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
815 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...