With this code, my grid is showed perfectly, the “getOutput” generates custom made XML-code.
BUT, how do I save changes in the grid?
I’m stuck in the my_update function. Do I need this function? Is this the right way?
I need to know what fields are updated so I can write a custom query…
The client side seems to work. When a field is edited, it’s bold. Under the grid, there is an update button, but when I click this button, it says “incorrect xml”…
the grid loads perfectly, and I get no error when i click update without changing a cell…
f.e., if my fully custom code needs to do nothing, the myupdate function needs to be empty (like now), but I get a xml-error now, when I click update… WHY??
If you still have a problems with connectors you an try to use the fully custom solution.
Just use the custom php script as target for dataprocessor - example of such custom script is attached. update_all.zip (1.31 KB)
I have a php class with a function that returns a string with the xml to show
I want to make another functin in this class that handles the incoming changes of the grid.
My only question is, how do I make this (client and serverside)?
Does someone PLEASE have an example of this? I’m trying to solve this for weeks now :s
Code need to do the next
a) check if POST[‘ids’] present, if this parameter exists - we are in update mode
b) split ids, and get $POST[$rowId."!nativeeditor_status"] - it contains the name of operation - based on it you need exec create, update or delete logic
The update.php from previous sample is fully functional update script without any external dependencies ( config.php - just creates a db connection )
Come on please, is it so hard to help me with this? When I use a custom one, I always get an xml-error when trying to update the grid. PLEASE support!!
I don’t understand either why there are no clear insert/update/delete samples for forms/grids, etc. with php/MySQL target in the documentation. Everyting needs to be searched together and at end it’s not working.
Would take them only a few hours to place such samples in the documentation.
Now there is still one problem: The $_POST array includes all columns of the updated row, but I only want to have the updated columns. How can I do this?