3

How do I go with making a tr clickable while using datatables, though yet keeping the original browser's menu so they can middle-click for new tab or rightclick for the original browsers menu? (such as open in new tab, page, copy link, etc.) ?

I've tried Superlink, but this does not work in all browsers, I need it to be cross-browser (IE7 and newer!)

Any tips/tricks?

2 Answers 2

3

check this example from DataTables: select_row and see if helps you.

see the source Initialisation code

Sign up to request clarification or add additional context in comments.

Comments

0

This works!

oTable = $('#RectifiedCount').dataTable( ....);

 $('#RectifiedCount tbody tr').live('click', function (event) {        
    var aData = oTable.fnGetData(this); // get datarow
    if (null != aData)  // null if we clicked on title row
    {
        //now aData[0] - 1st column(count_id), aData[1] -2nd, etc. 
        alert("equis");
    }
});

1 Comment

Doesn't work for me... Uncaught TypeError: Object [object Object] has no method 'live'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.