Edit from grid clicking on row

Hi all

I have the need to extend the edit of a grid ( application link ) not just clicking the pencil on the left but also clicking on any part of the row.
The linked application is displayed inside an iFrame on the right.
The is some Javascript that i can add to trigger an onClick on pencil image?
Thanks

Solved finally

had just to insert this javaScript code in onApplicationInit

?>
<script>
    $(document).ready(function() {
        $('.scGridTabela').on('click', 'tr',  function() {
            new Function($(this).find('a#bedit').attr('onclick'))();
    });
});
</script>
<?php

Ho this help someone

2 Likes

Thank you, very usefull

I was trying to get this same feature and came up with this, similar to Giorgio’s approach:

?>
<script>
    $(document).ready(function() {
        $('.scGridTabela').on('click', 'tr',  function() {
        var href = $(this).find("a").attr("href");
        if(href) {
        window.location = href;
        }
    });
});    
</script>
<?php

For some reason, this code won’t work if used in a grid with a filter in a Refined Search, unless the above code is added in OnRecord event.

JM

thanks! is their a way to hide the pencil or change the appearance with bootstrap?

?>
  <style>
     .bedit{display:none;}
  </style>
<?php

i tried that but that did’t work unfortunately . any idea

Thank you @gbravi. Working fine for me in OnRecord in V 9.10

Regards

1 Like