|
Title: edatagrid and updateURL Post by: rezzonico on May 14, 2014, 07:57:13 AM Hi Sworthy,
may I ask you to verify if this is a bug or my error ? I have modified the example with edatagrid found here: http://www.jeasyui.com/extension/edatagrid.php The only modification is in order to work with a database and not a json-file. To this purpose I have added saveUrl and updateUrl (see code below). The problem: If I add a new row, "saveUrl" is fired. This is ok. But if the next action is to modify the last added record, "saveUrl" is fired again (instead of "updateUrl"). If I modify another record (not the last) all is ok. Thanks a lot if you can confirm this. Regards Miche Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Title: Re: edatagrid and updateURL Post by: stworthy on May 14, 2014, 08:21:02 AM Be sure to return the added row data from your 'saveUrl' action. Please refer to this tutorial http://www.jeasyui.com/tutorial/app/crud2.php.
Title: Re: edatagrid and updateURL Post by: rezzonico on May 15, 2014, 12:59:32 AM Hi stworthy,
you are right ... I didn't return the added row. Now all works correctly. I just have a queston about the returned data. In the program save_user.php it seems me that it is sufficient the return the "id" (mysql_insert_id) and not all the fields. Do you see a problem if I return only the "id" and not all the fields ? Thanks a lot for your help. Miche |