Do you need editable to be able to delete a row?
Do you need editable to be able to delete a row?
I would call myself a total rookie when it comes to jquery/ajax. I'm using php to populate a table. What I would like to do is be able to have
my user select a row and be able to click delete.
I would prefer not to have to pay for editable, I just want to delete records.
Can someone please lead me in the right direction. I'm so frustrated.
All I have right now is this:
[code]
$(document).ready(function() {
$('#results_table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sScrollY": 200,
"sScrollX": "100%",
"sScrollXInner": "110%",
"sAjaxSource": "getdata.php"
} );
} );
[/code]
HTML:
[code]
Date
description
peelThickness
largeSheetCount
largeSheetDivertedCount
Loading data from server
Date
description
peelThickness
largeSheetCount
largeSheetDivertedCount
[/code]
my user select a row and be able to click delete.
I would prefer not to have to pay for editable, I just want to delete records.
Can someone please lead me in the right direction. I'm so frustrated.
All I have right now is this:
[code]
$(document).ready(function() {
$('#results_table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sScrollY": 200,
"sScrollX": "100%",
"sScrollXInner": "110%",
"sAjaxSource": "getdata.php"
} );
} );
[/code]
HTML:
[code]
Date
description
peelThickness
largeSheetCount
largeSheetDivertedCount
Loading data from server
Date
description
peelThickness
largeSheetCount
largeSheetDivertedCount
[/code]
This discussion has been closed.
Replies
why dont you try the jQuery DataTables Editable by Jovan Popavic then, its give under third party plugin in the following link
http://www.datatables.net/extras/
i myself have used the plugin for adding and deleting rows, hope this solves what you were looking for.
Arjun.
Allan
It looks like I have to add an id to the . I've looked at hundreds of different ways to do this. Can you please direct me on this. Like I say, my skills in this are low :)
TIA
dont use the editable plugin rather do it the way allen has posted above
here is what i have done
1.i had retrieved my id value in a column and have hidden it using,
[quote] "aoColumnDefs":[{"aTargets":[0],"bSearchable":false,"bVisible":false}],
"0" being the 1st column position keep you id in it.[/quote]
2. use table tools plugin to enable selecting a row or any other method you want
3. i got the id of the selected row using, since there is no id given by us, datatables will automatically pick the first column value as its id.
[code]
function fnGetSelected( oTableLocal )
{
var aReturn = new Array();
var aTrs = oTableLocal.fnGetNodes();
for ( var i=0 ; i
Allan