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.
$('#flexClients').dblclick(function () { edit(); });but nothing happens.