Add button not appearing in editable datatables
Add button not appearing in editable datatables
sdbrown_solumac
Posts: 5Questions: 0Answers: 0
I tried the following code and the "add" button is not appearing, can someone see where I am going wrong? When I use the code sAddDeleteToolbarSelector: ".dataTables_length" only the Delete Button appears and works highlighting when a row is selected and alerting when pressed. I checked the firebug and #btnAddNewRow is not being created?
- Stephen Brown
$(document).ready(function () {
$('#tableLocation').dataTable({
bJQueryUI: true,
"sPaginationType": "full_numbers"
}).makeEditable({
"aoColumns": [{
cssclass: "required"
}, {
type: 'textarea',
submit: 'Save changes'
}, {
cssclass: "required"
}, {
cssclass: "required"
}, {
cssclass: "required"
}],
oAddNewRowButtonOptions: {
label: "Add..."
},
oDeleteRowButtonOptions: {
label: "Remove"
},
oAddNewRowFormOptions: {
title: 'Add a new location',
show: "blind",
hide: "explode",
modal: true
},
sAddURL: "AddData.php",
sAddHttpMethod: "GET",
sDeleteURL: "DeleteData.php",
sDeleteHttpMethod: "GET",
sUpdateURL: function (value, settings) { return (value); }, // Sim Call
sAddDeleteToolbarSelector: ".dataTables_length"
});
});
A
B
C
D
E
<?php foreach ($locs as $loc) {?>
<?php echo $loc['field_b']; ?>
<?php echo $loc['geo_address']; ?>
<?php echo $loc['field_c']; ?>
<?php echo $loc['field_d']; ?>
<?php echo $loc['field_e']; ?>
<?php } ?>
- Stephen Brown
$(document).ready(function () {
$('#tableLocation').dataTable({
bJQueryUI: true,
"sPaginationType": "full_numbers"
}).makeEditable({
"aoColumns": [{
cssclass: "required"
}, {
type: 'textarea',
submit: 'Save changes'
}, {
cssclass: "required"
}, {
cssclass: "required"
}, {
cssclass: "required"
}],
oAddNewRowButtonOptions: {
label: "Add..."
},
oDeleteRowButtonOptions: {
label: "Remove"
},
oAddNewRowFormOptions: {
title: 'Add a new location',
show: "blind",
hide: "explode",
modal: true
},
sAddURL: "AddData.php",
sAddHttpMethod: "GET",
sDeleteURL: "DeleteData.php",
sDeleteHttpMethod: "GET",
sUpdateURL: function (value, settings) { return (value); }, // Sim Call
sAddDeleteToolbarSelector: ".dataTables_length"
});
});
A
B
C
D
E
<?php foreach ($locs as $loc) {?>
<?php echo $loc['field_b']; ?>
<?php echo $loc['geo_address']; ?>
<?php echo $loc['field_c']; ?>
<?php echo $loc['field_d']; ?>
<?php echo $loc['field_e']; ?>
<?php } ?>
This discussion has been closed.
Replies
[code]
oAddNewRowFormOptions: {
title: 'Add a new location',
show: "blind",
hide: "explode",
modal: true
},
[/code]
Do I need to do something else?