We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 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='
The text was updated successfully, but these errors were encountered:
temporary solution here
//setup.js onDeleteRow: function(datatable, rowdata, success, error) { $.ajax({ url: '/api/delete/product/1', type: 'POST', data: getSelectedId(pTable, 'p_id'), success: function(response) { ////// Call the 'success' callback if it was provided if (typeof success === 'function') { success(response); } }, error: error }); }
//// prepare data object support multi select function getSelectedId(table, idname) { let data = table.rows({ selected: true }).data().toArray(); const objectData = {}; data.forEach(item => { const idValue = item[idname]; // Use square brackets to access the property dynamically objectData[idValue] = "del"; }); console.log(objectData); return objectData; }
Sorry, something went wrong.
No branches or pull requests
//rowdata are working fine at onAddRow and onEditRow, but it has problem with onDeleteRow
The text was updated successfully, but these errors were encountered: