EasyUI Forum
June 27, 2024, 05:03:47 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Server database processing no validation hook for edatagrid extension on: April 25, 2012, 10:46:36 AM
I am not a very capable javascript programmer but here is what we added.
Add this after the line "data.isNewRecord = null;" in the onAfterEdit section

if(data.error_message != ""){process_table_error(data.error_message)};

This requires you to make sure that first element in your returned JSON is "error_message" with a value of "" for now error. If you have an error, pass "error_message" with the value of your error message.

Then in your javascript section of your page add:

 function process_table_error(error_msg){
            $.messager.alert('Error',error_msg);
             
  }


I know it is primitive but it is working form me at the moment.

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!