Add and edit options

Add and edit options

snoozesnooze Posts: 2Questions: 1Answers: 0

I am beginner and I am looking for adding "add new" row option with inline editing for already fetched data with submit and cancel options and I cannot use the licensed editor version .
How can I go about it?

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    Editor offers inline creation as shown in this example.

    If you can't use Editor for licensing / purchasing reasons, you would need to write the code to perform the actions you require. Needless to say, Editor is our commercial software and is what makes continued DataTables development possible - it is our solution for the issue you are looking to solve.

    Allan

  • snoozesnooze Posts: 2Questions: 1Answers: 0

    cant we use row.add() and render to do the same .

  • kthorngrenkthorngren Posts: 21,341Questions: 26Answers: 4,954

    You can create a table similar to this example with inputs. The example shows how to keep the table in order when the inputs are changed. You will need to add code to get the changes to save to the server. You can use things like cell().data() or row().data() to get the data then push to the server via ajax.

    You cn use row.add() to add an empty row that can then be edited. You can use columns.render to render the appropriate inputs.

    The difficult part, which Editor does very nicely, is to keep the client and server data updated and synchronized.

    Kevin

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    Also Editor provides the UI at the front end. If you have a form that has the data you want to add to the DataTable, then yes, absolutely, row.add() is the method to use.

    Allan

Sign In or Register to comment.