Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to correctly associate double click with the Edit?
Message
De
09/04/2013 21:26:52
 
 
Information générale
Forum:
Javascript
Catégorie:
JQuery
Divers
Thread ID:
01570547
Message ID:
01570552
Vues:
59
This message has been marked as a message which has helped to the initial question of the thread.
edit function is expecting parameters that are not being passed from double click.


>Hi everybody,
>
>I have the following script
>
>
>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;
>
>      $.get(url, function (html) {
>         $($dlg).html(html);
>      });
>
>      RunModalDialog("Edit Client: " + ClientName);
>
>   });
>}
>
>which is invoked this way:
>
>
>   buttons: [
>   { name: 'Add', bclass: 'add', bimage: '../Content/Themes/FlexiGrid/Images/add.png', tooltip: 'Add new client', onpress: add },
>   { name: 'Edit', bclass: 'edit', bimage: '../Content/Themes/FlexiGrid/Images/edit.png', tooltip: 'Edit selected client', onpress: edit },
>   { name: 'Delete', bclass: 'delete', bimage: '../Content/Themes/FlexiGrid/Images/delete.png', tooltip: 'Delete selected client', onpress: del },
>   { separator: true }
>   ],
>
>
>and I also want to be able to double click on the row and invoke the same action.
>
>So, I tried (I am using latest jquery):
>
>
>$('#flexClients').dblclick(function () {
>   edit();
>});
>
>but nothing happens.
>
>I know that the code itself attaches the handle correctly to dblclick (if I change the edit to alert, it fires).
>
>So, what I am doing wrong here and how should I adjust the above?
>
>Thanks a lot in advance.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform