GET aaData for table with Editor response
GET aaData for table with Editor response
Hi everyone,
I am trying to use Editor create method to get data for a table with server response.
For example:
[code]
// Client sends:
{
"id": -1,
"table": "",
"action": "create",
"data": {
"browser": "Chrome",
"engine": "Webkit",
}
}
[/code]
[code]
// Return from server:
{
"id": -1,
"error": "",
"fieldErrors": [],
"data": [],
"aaData": [
{
"DT_RowId": "row_1",
"version": 10,
"grade": "A",
},
{
"DT_RowId": "row_2",
"version": 12,
"grade": "+A",
},
{
"DT_RowId": "row_3",
"version": 14,
"grade": "++A",
}
]
[/code]
I am willing to use this to get filtered data from server and want to implement it through Editor form (i.e. send keywords through form and get result in response)
Is this way would be the right way to achieve such task? Or even is it possible?
Any ideas are welcome.
I am trying to use Editor create method to get data for a table with server response.
For example:
[code]
// Client sends:
{
"id": -1,
"table": "",
"action": "create",
"data": {
"browser": "Chrome",
"engine": "Webkit",
}
}
[/code]
[code]
// Return from server:
{
"id": -1,
"error": "",
"fieldErrors": [],
"data": [],
"aaData": [
{
"DT_RowId": "row_1",
"version": 10,
"grade": "A",
},
{
"DT_RowId": "row_2",
"version": 12,
"grade": "+A",
},
{
"DT_RowId": "row_3",
"version": 14,
"grade": "++A",
}
]
[/code]
I am willing to use this to get filtered data from server and want to implement it through Editor form (i.e. send keywords through form and get result in response)
Is this way would be the right way to achieve such task? Or even is it possible?
Any ideas are welcome.
This discussion has been closed.
Replies
[code]
// Return from server:
{
"id": "row_90",
"row": {
"browser": "Chrome",
"engine": "Webkit",
"platform": "Win / Mac / Linux",
"version": "535.1",
"grade": "A"
}
}
[/code]
Documentation here: http://editor.datatables.net/server/
Is it that you want to reload the data for the whole table? If so, you'd need to use the fnReloadAjax plug-in with Editors onPostCreate method.
Regards,
Allan