row disappears after editor update

row disappears after editor update

crush123crush123 Posts: 417Questions: 126Answers: 18
edited March 2015 in Editor

I have a datatable/editor page, json sourced data, filtered by a url parameter.(EventID)

if my editor syntax is like this

editor = new $.fn.dataTable.Editor( {
    ajax: {
        url: "/admin/events/ajax/ajax_eventticketsales.php",
        data: {EventID: <?php //echo isset($_GET['EventID'])?$_GET['EventID']:0;?>}
    },

the row disappears after edit, (and the json returned in the Ajax response is null)

if i change the editor syntax to this

editor = new $.fn.dataTable.Editor( {
    ajax: {
        url: "/admin/events/ajax/ajax_eventticketsales.php?EventID=<?php echo isset($_GET['EventID'])?$_GET['EventID']:0;?>"
    },

and append the parameter to the url string

There is no problem.

The original syntax is the same as on my datatable

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    (and the json returned in the Ajax response is null)

    As in { row: null }?

    If so, it means that your edited row no longer meets whatever filtering criterion you have applied to the script - probably using the where() method.

    Allan

This discussion has been closed.