开发者

jqgrid server exception error messages

开发者 https://www.devze.com 2023-01-26 23:42 出处:网络
Is there a way to show custom exception messages sent from the server in my j开发者_开发知识库qGrid???? One of my function does a throws clause and throws some exception. I need to disoplay the error

Is there a way to show custom exception messages sent from the server in my j开发者_开发知识库qGrid???? One of my function does a throws clause and throws some exception. I need to disoplay the error message relative to this thrown exception... Is there a way to do that in jqGrid???


You don't spectify in what jqGrid operation the exception could be throwen. There are different event handler which you can use to receive the text of the error message from the exception and decode it.

For example loadError(xhr,st,err) can be used to display the error messege which appears on the server during the loading of the jqGrid. I mean here the errors returned by the server on the ajax requests.

Additionally errorTextFormat(data) can be used to decode errors come up from the server during the ajax requests of the form editing. or errorfunc(rowid,res,stat) for the inline editing and errorCell(serverresponse,status) for cell editing.

So you can use the corresponding event handler functions in different places to decode the text of the exception message.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号