Display nice error message when there is something wrong after ajax request jqgrid
- by Niels Ilmer
Hello,
I delete rows with this function:
function deleteRow(){
rows = jQuery("#category_grid").getGridParam('selarrrow');
if( rows.length>0){
jQuery('#category_grid').delGridRow(rows,{
msg:'Verwijderen geselecteerde rijen?'
});
}else{
alert("Selecteer eerst een rij om te verwijderen!");
}
}
but when it's fails in my php, server side and a exception is thrown. The errormessage looks not nice. How can i show errotext in the dialog box? or catch an error message after an ajax call?
At the moment the error message looks like: error Status: 'CDbException'. Error code: 500
When i googled i found a event of the delGridRow function called errorTextFormat. Is this the event where i'm looking for? Can someone please give me an example of the implementation of this event?
greetings
niels