Stop row creation in Editor
Stop row creation in Editor
Hey there,
Is there a way to stop the Datatable from adding a row after the creation event? I'm looking at the preCreate
event (https://editor.datatables.net/reference/event/preCreate), but am not sure if I can do anything besides modify the data itself sent to the triggered fnAddData
.
Use case: crossing products with other products. Create a new product to be crossed inline with another and thus have the new data filled in to that row via Datatable and thus don't need a new row created to represent the new product.
Thanks for any insight-
This question has an accepted answers - jump to answer
Answers
You could use
postSubmit
to intercept the JSON returned from the server and empty thedata
array that is returned. If Editor doesn't see any returned data it won't add anything (this is Editor 1.5+).Allan
Boom. Thank you!