Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DropDownListFor binding
Message
 
 
À
15/01/2013 13:27:08
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 5.0
Divers
Thread ID:
01562476
Message ID:
01562727
Vues:
21
>>The Details method is never called :( I don't know how to really trace jquery as the underlying code is too hard for me. I see something is going on in the debugger, but I never see any alert.
>>
>>I've changed the code to
>>
>>
>>  $.getJSON(url, id, function (data) {
>>                    //  setFormControls(data.Id, data.Role, data.Location, data.JobType, data.Description);
>>                    alert(data);
>>                });
>>
>>Do you or anyone see what is wrong here?
>
>If it's not returning then presumably the url is wrong. Does the controller get hit?

Not in this method. I do have the Details method in the Client controller.

It used to work with Load method (http://social.microsoft.com/Forums/en-US/partnerdevaspnet/thread/61443760-bd03-4e31-95a4-7d6f4ce4f39a - partner forum's thread).

Some original code partially working with other problems:
var $dlg = $("#sform").dialog({
    autoOpen: false,
    show: "blind",
    closeOnEscape: true,
    resizable: true,
    width: 1200,
    height: 750,
    minHeight: 600,
    minWidth: 950
});

function RunModalDialog(title, url)
{
    
    if (title)
        $dlg.dialog("option", {  "title": title });

    if (url)
       
        $dlg.load(url, function () {
            $dlg.dialog("open");
        });
    else
      $dlg.dialog("open");
}

function add(com, grid){
    RunModalDialog("Create New Client");

    clearForm();
    $('#fntype').val('Add');
}
 
function edit(com, grid)
{
        $('.trSelected', grid).each(function () {
          
                var id = $(this).attr('id');
                id = id.substring(id.lastIndexOf('row') + 3);
                currentId = id;
                $('#fntype').val('Edit');
                var ClientName;
                ClientName =$('.trSelected td:eq(2)').text();
               var url = '/Client/Edit/' + id;            
            
               RunModalDialog("Edit Client: " + ClientName, url);
        });

    }
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform