Editor is not setting id on server packet
Editor is not setting id on server packet
I was able to work around that for insert since I always use id as the tag for my pk. BUT when it comes to delete, the pk is essential and the server only gets the following (using debug to show and copy $_POST).
array(4) (
[action] => (string) remove
[table] => (string) form_products
[id] => (string)
[data] => array(1) (
[0] => (string)
)
)
I have tried to follow the examples but when I use the mDataProp I get a - Requested unknown parameter 'id' from data source for row 0. This seems to solve and run OK when I change the entry "mDataProp": "'.$colname.'", to "mDataProp": "'.$i.'", which is the loop counter. The table fills in, server side works, pagination, column sort and Editor all work EXCEPT for deletion.
Since I am not using the DT built in database classes is there a way for me to tell the Editor which column is the primary key so it can pass it to the server?
array(4) (
[action] => (string) remove
[table] => (string) form_products
[id] => (string)
[data] => array(1) (
[0] => (string)
)
)
I have tried to follow the examples but when I use the mDataProp I get a - Requested unknown parameter 'id' from data source for row 0. This seems to solve and run OK when I change the entry "mDataProp": "'.$colname.'", to "mDataProp": "'.$i.'", which is the loop counter. The table fills in, server side works, pagination, column sort and Editor all work EXCEPT for deletion.
Since I am not using the DT built in database classes is there a way for me to tell the Editor which column is the primary key so it can pass it to the server?
This discussion has been closed.
Replies
[code]
{
"DT_RowId": "row_1",
"engine": "Trident",
"browser": "Internet Explorer 4.0",
"platform": "Win 95+",
"version": "4",
"grade": "X"
},
[/code]
Allan
Any ideas?
array(4) (
[action] => (string) remove
[table] => (string) form_products
[id] => (string)
[data] => array(1) (
[0] => (string)
)
)
If the [id] could show the value of the PK from the Editor fields or the data array [0] had the entire record I could extract the PK and do the deed.
Allan
Regards,
Allan
Anyway, thanks again. This is sweet code and the Editor works like a treat. Well worth the money and time invested to learn it and get it going.
I'm planning of updating the examples fairly significantly in 1.3. There is a lot of information already there, and a lot that is effectively hidden - 1.3 will have a better layout showing the various components of how Editor works, which will hopefully help in getting a grounding with Editor.
Regards,
Allan