Skip to content

delete row ajax problem #229

@darkjackx

Description

@darkjackx
// setup js
onDeleteRow: function(datatable, rowdata, success, error) {
    $.ajax({
        url: '/api/delete/product/1',
        type: 'POST',
        data: rowdata,
        success: function(response) {
            if (typeof success === 'function') {
                success(response);
            }
        },
        error: error
    });
}

//rowdata are working fine at onAddRow and onEditRow, but it has problem with onDeleteRow

////////// testing data
////// example 03 delete row
let s = {};
s.data = [
  {
      "id": 1,
      "name": "Tiger Nixon",
      "position": "System Architect"
  }
]
			s.data = jQuery.param( s.data, s.traditional );
      // s.data = 'Tiger%20Nixon='
////// customer data delete row
let s = {};
s.data = [
  {
    "p_id": "5",
    "p_brand": "mi",
    "p_name": "remei"
  }
]
			s.data = jQuery.param( s.data, s.traditional );
      // s.data = 'undefined='

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions