Add button not appearing in editable datatables

Add button not appearing in editable datatables

sdbrown_solumacsdbrown_solumac Posts: 5Questions: 0Answers: 0
edited March 2012 in General
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 } ?>

Replies

  • MPeter1975MPeter1975 Posts: 31Questions: 0Answers: 0
    Just a guess, but have you defined the form for the addition?
  • sdbrown_solumacsdbrown_solumac Posts: 5Questions: 0Answers: 0
    Sorry I thought this did it...

    [code]
    oAddNewRowFormOptions: {
    title: 'Add a new location',
    show: "blind",
    hide: "explode",
    modal: true
    },
    [/code]

    Do I need to do something else?
  • sdbrown_solumacsdbrown_solumac Posts: 5Questions: 0Answers: 0
    I see, your right a whole form missing, *bow* thank you.
This discussion has been closed.