EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 03, 2024, 04:59:58 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Grid OnLoadError
Pages: [
1
]
« previous
next »
Print
Author
Topic: Grid OnLoadError (Read 13948 times)
mapner
Jr. Member
Posts: 63
Grid OnLoadError
«
on:
September 17, 2012, 06:40:56 AM »
Hello:
in Grid - OnLoadError how to make for receive an error message from the server?
thanks
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Grid OnLoadError
«
Reply #1 on:
September 18, 2012, 02:47:43 AM »
What error messages do you want to receive? This event is triggered if the ajax request fails.
Logged
mapner
Jr. Member
Posts: 63
Re: Grid OnLoadError
«
Reply #2 on:
September 18, 2012, 05:11:07 AM »
Ok, when I try to load a Datagrid and a database error happen in PHP, how to send and receive the database error message for show it in UI?
Logged
mzeddd
Full Member
Posts: 223
Re: Grid OnLoadError
«
Reply #3 on:
September 18, 2012, 06:09:25 AM »
Do you mean you want to get some text like "We are sorry, but ....
" sent by PHP script to your DataGrid?
Or would you like to have static message like "Failed to load data" from DataGrid and do not know how to trigger it by PHP?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Grid OnLoadError
«
Reply #4 on:
September 18, 2012, 06:12:36 AM »
In fact, this is not ajax errors. The 'onLoadError' event is no suitable to do this. Try adding addtionable message in your success returning data.
{"total":0,"rows":[...],"err":"..."}
The data above will be sent to browser, you can use 'onLoadSuccess' event or 'loadFilter' function to get this data and retrieve the error message.
Logged
mapner
Jr. Member
Posts: 63
Re: Grid OnLoadError
«
Reply #5 on:
September 18, 2012, 10:18:07 AM »
Ok Stworthy, thanks!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...