Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
How to get the row on row double click
posted

Is there any event to capture the row double click event? And i need how to read an item in the selected row and pass it as a query string to some other page. I need sample in ASP.NET MVC Razor (cshtml). It will be great if some one can assist me on the same.

Parents
  • 23953
    Suggested Answer
    Offline posted

    Hello Suresh A,

    Currently igGrid doesn't support row double click event out of the box. As a workaround you can use jQuery dblclick function and bind to igGrid directly to listen for double click events.

    Your code should look like this:

    $("#grid1").dblclick(function (event) {

    // row html element

    var row = $(event.target).closest('tr');

    // data key value

    var key = row.attr("data-id");

    // cell values

    var cellZeroValue = row.find('td:eq(0)').text();

    var cellOneValue = row.find('td:eq(1)').text();

    var cellTwoValue = row.find('td:eq(2)').text();

    // get the next cell value by changing eq index argument. For example :eq(3) will return four  element

    }

    );

     

    igGrid MVC wrapper obviously doesn't have row double click event functionality also. You can use it to create the grid, but you have to put JavaScript code as the code above to listen for double click events.

     

    You can find good examples on how to create igGrid in Razor code in our samples site:

     https://www.igniteui.com/grid/overview

     

    You can also want to look at this forum post:

    https://ko.infragistics.com/community/forums/f/ignite-ui-for-javascript/59503/get-value-from-selected-row-on-double-click

     

    Hope this helps,

    Martin Pavlov

    Infragistics

Reply Children