Customize REST AJAX URL with data other than ID

Customize REST AJAX URL with data other than ID

LesserDJHLesserDJH Posts: 2Questions: 1Answers: 0

Currently, it's a simple matter to customize DataTables for a RESTful interface, using ROW_ID.

ajax: { create: { type: 'PUT', url: 'blah/blah/blah/_id_' }, edit: { type: 'PUT', url: 'blah/blah/blah/_id_' }, remove: { type: 'DELETE', url: 'blah/blah/blah/_id_' } }

So you get something like 'blah/blah/blah/ROW_98' as the URL.

Is there a way that I can write the URL using data from the table? So the URL would render as something like "blah/blah/blah/thisisthenameofthepageforthisrowofdata' (without ROW_ prepended).

Answers

  • LesserDJHLesserDJH Posts: 2Questions: 1Answers: 0

    Nevermind, found it! For anyone trying to do something similar, use idSrc.

Sign In or Register to comment.