Row CallBack

Row CallBack

TsokotsaTsokotsa Posts: 7Questions: 2Answers: 0

Hi All

I am new on DT, i recently installed it on Laravel 5 and i am struggling to have the jquery dialog opened when i click into a DT row.
So what i am trying to accomplish is the following:
1. I will bring my records using DT from my Database.
2. Once my DT is created i then call a fnRowCallback to have that row, but the data is loaded dynamical from a different URL. (see code below). when i click on the row, it actualy opens the dialog, but the dialog only contains the data of the row instead of the dat that was returned from the url i pass on the fnRowCallback.

// The Callback
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
var id = aData.id;
var url = "<?= URL::to('/');?>" +"/user/" +id +"/edit";
var ref = url;
$(nRow).attr("title","View Detail - " +aData.name +' ' +aData.surname );
$(nRow).attr("href",ref);
$(nRow).addClass('popup-edit');
return nRow;
}

// Where i click on row

$('#users').on( 'click', '.popup-edit', function (e) {

$(this).dialog({
dheight: 500,
dwidth: 750,
modal: true,

});
});

That is driving me crazy for days now and i appreciated if someone could help me.

Thank you in advance :)

This discussion has been closed.