Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9047157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:50:11+00:00 2026-06-16T11:50:11+00:00

For many days I’ve been trying unsuccessfully to implement Modal dialog editing in a

  • 0

For many days I’ve been trying unsuccessfully to implement Modal dialog editing in a flexigrid.

I started with a very simple example:

http://mvc4beginner.com/Sample-Code/Insert-Update-Delete/Asp-.Net-MVC-Ajax-Insert-Update-Delete-Using-Flexigrid.html

I expanded this example a lot, but I hit a road block and I don’t know how to achieve desired functionality.

I implemented the following jquery function:

    function RunModalDialog(title, url)
    {
        $("#sform").dialog({
            autoOpen: false,
            show: "blind",
            closeOnEscape: true,
            resizable: true,
            width: 1200,
            height: 750,
            minHeight: 600,
            minWidth:950
        });
        if (title)
            $("#sform").dialog("option", "title", title);

        if (url)
            $("#sform").load(url).dialog("open");
        else
          $("#sform").dialog("open");

And I am calling it from Add button (without url) and from the Edit button (with a url).

It works OK for the Add (although I haven’t yet implemented actual save and grid refresh), but I can not make it work on Edit.

Here is my main view code

@model CardNumbers.Objects.Client

@{
    ViewBag.Title = "Clients";
}

@section scripts {
    <script src="@Url.Content("~/Scripts/Clients.js")" type="text/javascript" ></script>
}

<form id="frmClientsSearch">
    <label for="clientNo">Client No: </label>
    <input type="number" name="searchClientNo" class="numericOnly" /><br />
    <label for="clientName">Client Name: </label>
    <input type="text" size="25" value="Please enter the search value" class="SelectOnEntry"
        name="searchClientName" />

    <input type="button" id="btnClientsSearch" value="Find / Refresh" />
</form>
<div style="padding-left: 150px; padding-top: 50px; padding-bottom: 50px;" id="ClientsResults">
    <table id="flexClients" style="display: none">
    </table>
</div>

<div id="editor" style ="visibility :hidden ">
      @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "sform", title = "Client Info" }))
     { 
        @Html.Partial("_ClientForm", Model)   
      }      
</div>

And the Edit method of the client controller returns a view which is


    @model CardNumbers.Objects.Client

    @{
        ViewBag.Title = "Edit Client";
        Layout = "~/Views/Shared/_PopupLayout.cshtml";
    }

    @Html.Partial("_ClientForm", Model)

    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
        
    }

I originally had the BeginForm inside the _ClientForm and I could see the form, but the x (close) and Resize didn’t work. I now tried moving the line that starts the form outside, but now the behavior is even worse.

Can you tell me how this is supposed to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:50:12+00:00Added an answer on June 16, 2026 at 11:50 am

    Two things I can think of doing is

    1. Check that the URL is valid,

    2. Call dialog once the div has been filled up

      $("#sform").load(url).dialog("open");

    becomes

        $("#sform").load(url, function(){
           $("#sform").dialog("open");
        });
    

    If a "complete" callback is provided, it is executed after post-processing and HTML insertion has been performed.

    NOTE THIS WAS A PROPOSED ANSWER TO THE QUESTION BEFORE IT WAS MODIFIED

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying for many days now to upload a file (message.txt) to aws
I've been trying for many days to try and solve this issue. A 3rd
How do I check how many days left until a specific date? For example,
I need help on how to find out how many days it has been
I'm trying to have a display of how many days, hours, minutes, and seconds
I have finally managed to launch my app after many days of trying but
I see offline_access is been depreciated. I just want to know,how many days will
I have a form where user have to enter how many days example user
Hi I have been searching a solution to this problem for many days but
I have been dealing many days with a problem without any success. In my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.