See how its getting the row data for the clicked row. Use something similar and use that to populate an edit form. Then use row().data() as a setter to update the row data in the table.
This is a one time project that I was asked to do. It is certainly not my expertise as I am sure you all could see. I would absolutely buy Editor if I were to do this for a living. The cost is very affordable and it seems like it would be an excellent tool. I just have one last thing I am hoping to tackle - that is getting the edit piece to work.
Answers
ok I figured it out
last question... I hope
Can I edit an existing row without editor?
added this:
// Edit record
$('#modport tbody').on( 'click', 'tr .fa-pencil', function () {
table.row( this ).edit( {
buttons: [
{ label: 'Cancel', fn: function () { this.close(); } },
'Edit'
]
} );
} );
but it didn't work
Editor will do that for you
Colin
Go back to this example I linked at the start of the this thread:
http://live.datatables.net/xijecupo/1/edit
See how its getting the row data for the clicked row. Use something similar and use that to populate an edit form. Then use
row().data()
as a setter to update the row data in the table.Kevin
yes I am on that track. see this:
http://live.datatables.net/dugigipe/4/edit
but for some reason it is not populating my edit form
Out of interest, is there something that Editor doesn't do that you need, or is it the price that puts you off it?
Allan
HI Allan,
This is a one time project that I was asked to do. It is certainly not my expertise as I am sure you all could see. I would absolutely buy Editor if I were to do this for a living. The cost is very affordable and it seems like it would be an excellent tool. I just have one last thing I am hoping to tackle - that is getting the edit piece to work.