Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Getting a TypeError when calling 'fnPreRowSelect' - e is undefined.

$
0
0
http://jsfiddle.net/bigsipper/nwMAP/ http://debug.datatables.net/elukep

I am using an example from a previous discussion to 'disable' row selection on certain columns.
http://datatables.net/forums/discussion/comment/42209

But when I run, it throws a Javascript exception:

TypeError: e is undefined
if ( $(e.srcElement).hasClass('open_modal') ) {

Ummmmm.... this is on a 'click' event, so.... how could the event not be defined?

            "oTableTools": {
               "sRowSelect": "os",
               "aButtons": [ "select_all", "select_none" ],
               "fnPreRowSelect": function ( e, nodes ) {
                  if ( $(e.srcElement).hasClass('open_modal') ) {       //<<< this is where it stops.
                     return false;
                  }
                  return true;
               },


Viewing all articles
Browse latest Browse all 1816

Trending Articles