Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to correctly associate double click with the Edit?
Message
 
 
To
All
General information
Forum:
Javascript
Category:
JQuery
Title:
How to correctly associate double click with the Edit?
Miscellaneous
Thread ID:
01570547
Message ID:
01570547
Views:
59
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.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform