jega
|
|
« on: March 23, 2023, 03:44:11 AM » |
|
Hi.
Have problems with edatagrid
When hit button to destroyRow, it calls the url in destroyUrl and it deletes from db. But, it never removes it from the grid.
I can just remove the destroyUrl method and then it removes it from the grid, but then it cant call the db.
Then i thought i could just reload the grid after destroy the record, but it never get into onDestroy.
<a id="removeButton" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" onclick="$('#dgLimitList').edatagrid('destroyRow')">Fjern</a>
$('#dgLimitList').edatagrid({ url: 'getfromdb.asp?st=limitlist&dataident='+row.dataIdent, onDestroy: function(index,row){ console.log('test'); }, destroyMsg:{ norecord:{ title:'Bemærk', msg:'Ingen række valgt.' }, confirm:{ title:'Bekræft', msg:'Er du sikker på den skal slettes?' } }, autoSave: true, saveUrl: 'data_limitlist.asp?st=insert&dataident='+row.dataIdent, updateUrl: 'data_limitlist.asp?st=update', destroyUrl: 'data_limitlist.asp?st=delete' });
Any help
Regards Jesper
|