How to define column data in JQuery if the data itself is html tag that defined in the server?

How to define column data in JQuery if the data itself is html tag that defined in the server?

reginaavenareginaavena Posts: 1Questions: 1Answers: 0

Code from server (using laravel)

$users = User::select('id', 'name', 'email')->get();
return Datatables::of($users)->addColumn('Action','<a herf="/edit/{{$id}}">edit</a>')->make(true);

In the jquery

$('#entityTable').DataTable({
 /--code--/
 columns: [
              { data: 'id;},
              { data: 'name;},
              { data: 'email;},
              { data: /-- what to do --/;},
]
});

I didn't use columns definition before and the code run perfectly. Now that I need to define the column for inline editing using Editor.

Answers

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin

    What does that server-side code return? Is it JSON loading? What is that JSON?

    Allan

This discussion has been closed.