Modal popup window from one column on grid

Modal popup window from one column on grid

jjonkersjjonkers Posts: 5Questions: 1Answers: 0
edited September 2013 in General
$("#import_containers").dataTable({
//"bProcessing": true,
"aaData": data["aaData"],
"aoColumns": [{ "sTitle": "Number", "sClass": "open_modal" },
{ "sTitle": "Line", "bSortable": false, "sClass": "open_modal" },
{ "sTitle": "Holds", "sClass": "open_modal" },
{ "sTitle": "Available" },
{ "sTitle": "Location"},
{ "sTitle": "LFD" },
{ "sTitle": "Freight" },
{ "sTitle": "Vessel", "sClass": "center" },
{ "sTitle": "Voyage", "sClass": "center" },
{ "sTitle": "Demurrage", "sClass": "center" },
{ "sTitle": "Pay Fees", "sClass": "center" }
],
"fnPreRowSelect": function ( e, nodes ) {
if ( $(e.currentTarget).hasClass('open_modal') ) {
// If the following 'return false;' is uncommented then the the function works and the row does not get selected
// However while commented the row does get selected and the modal popup opens
// return false;

$("#modal").html('test').dialog();
}
}

Here is my code I'm trying to open a modal dialog when one of the columns is clicked with "sClass": "open_modal"

Does not seem to be working. Any thoughts on this ?

Thanks

Jerry
This discussion has been closed.