How To Add Delete Functionality In JEasyUI DataGrid
Posted by blogmeister on
January 30, 2013
While JEasyUI has an extended DataGrid component called eDataGrid, I opted to still use DataGrid rather than load up another script library.
Here is the function to delete a row in a JEasyUI DataGrid table complete with a notification popup when the delete HTTP request is in progress and closes itself when it is done.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function deleteRow(index) { if (confirm('Are you sure you want to delete this entry?')) { $('#tt').datagrid('loading'); $.ajax({ type: 'POST', url: 'delete.php', data: '', success: function (msg) { $('#tt').datagrid('loaded'); $('#tt').datagrid('deleteRow', index); }, error: function (msg) { $('#tt').datagrid('loaded'); } }); } } |
Share the post "How To Add Delete Functionality In JEasyUI DataGrid"










