Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to correctly associate double click with the Edit?
Message
General information
Forum:
Javascript
Category:
JQuery
Miscellaneous
Thread ID:
01570547
Message ID:
01570654
Views:
54
This message has been marked as the solution to the initial question of the thread.
>Here is what I see (see attached) - I am debugging in IE.
>
>What should I do with it?
>
>Here is what I currently have:
>
>
>onSubmit: addFormData,
>   //onDoubleClick: edit('Edit', this),
>   onSuccess: bindDblClick,
>   addTitleToCell: true,
>   hideOnSubmit: false,
>   height: 'auto',
>   singleSelect: true
>});
>
>and this is what I put in bindDblClick
>
>
>function bindDblClick() {
>   $('#flexClients tr').dblclick(function () {
>      
>      edit('Edit', $('#flexClients'));
>   });
>}
>
>where Edit starts with:
>
>
>function edit(com, grid) {
> 
>   $('.trSelected', grid).each(function () {
>
>      var id = $(this).attr('id');
>      alert('Id is: ' + id);
>...
>
Responding here instead of the other thread:

>I've upgraded to the latest jQuery and also downloaded the latest version of flexigrid (because the previous didn't work with latest jQuery) and now this solution doesn't work anymore :(

>I am not sure how to fix it or make it work with the latest stuff. Do you have any ideas?

Easiest thing - why did you upgrade? Do you need some new feature/bugfix of jQuery? If not, go back to the old version.

To debug this, I'd open the site up in Chrome and select a row. Then I'd go into Elements and click on the magnifying glass icon (small icon at the bottom) and select the row that is highlighted. In the source I'd make sure that they're still attaching the class of "trSelected" to the selected rows. If that looked good, I'd then click on the Console menu option and attempt to view difference references / run your code:
$('#flexClients')   (then hit Enter - is a bit of HTML returned? If not, you've got the wrong reference)

$('.trSelected', $('#flexClients')).each(function() { alert('Id is: ' + $(this).attr('id')) })  (then hit enter, it should display the selected row ID)
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform