editable datatable with a select????
editable datatable with a select????
Hi, I have this code
[code]
$(document).ready(function() {
/* Init DataTables */
var oTable = $('.sortable').dataTable();
/* Apply the jEditable handlers to the table */
$('td:eq(4), td:eq(5), td:eq(6), td:eq(7)', oTable.fnGetNodes()).editable( '../../../includes/actions/edit_user_tables.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px"
} );
} );
[/code]
Im trying to figuiring out how to add a select drop button on the column 8.
The code above is without this column editable. I didnt added it yet because the editable field is giving me html tags and I need to put numbers as values. I tried to find info here but there is no a solution for my problem.
Can someone help me???
The actual table edits fine the columns but I need to add extra code to add a select field on the last column.
I hope someone can help me with a sample or something that gives me an idea on how to do that.
Thanks
Damian
[code]
$(document).ready(function() {
/* Init DataTables */
var oTable = $('.sortable').dataTable();
/* Apply the jEditable handlers to the table */
$('td:eq(4), td:eq(5), td:eq(6), td:eq(7)', oTable.fnGetNodes()).editable( '../../../includes/actions/edit_user_tables.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px"
} );
} );
[/code]
Im trying to figuiring out how to add a select drop button on the column 8.
The code above is without this column editable. I didnt added it yet because the editable field is giving me html tags and I need to put numbers as values. I tried to find info here but there is no a solution for my problem.
Can someone help me???
The actual table edits fine the columns but I need to add extra code to add a select field on the last column.
I hope someone can help me with a sample or something that gives me an idea on how to do that.
Thanks
Damian
This discussion has been closed.
Replies
Allan