DataTable Editor (MJoin with Link Table) not work (C# .Net version)
DataTable Editor (MJoin with Link Table) not work (C# .Net version)
Dear Allan,
I have purchased DataTables Editor and its a really very nice product I ever seen, I am following the example which is included in download (Join tables - one-to-many join) Example Using .Net WebApi.
The example works fine after setup, I followed same code to incorporate in my Project then I suspect an error behavior and when I did same to the sample data I get the same error result. as the example is based on three table
USERS
USER_PERMISSION
PERMISSION
if I truncate USERS table and I try to insert fresh record the Permission check boxes disappeared means not loaded from database to select.
See Image JoinArrayPermission.png
The Ajax Load TAB show the following Data Received from Server
{
"draw": null,
"data": [],
"recordsTotal": null,
"recordsFiltered": null,
"error": null,
"fieldErrors": [],
"id": null,
"meta": {},
"options": {
"users.site": [
{
"value": 1,
"label": "Edinburgh"
},
{
"value": 2,
"label": "London"
},
{
"value": 6,
"label": "Los Angeles"
},
{
"value": 4,
"label": "New York"
},
{
"value": 3,
"label": "Paris"
},
{
"value": 5,
"label": "Singapore"
}
]
},
"files": {},
"upload": {
"id": null
},
"debugSql": null,
"cancelled": []
}
If I insert the record and select it and make it edit still the Permission check boxes disappeared means not loaded from database to select. Then I just Refresh the page by hitting (F5) and after that the Ajax Load TAB show the following Data Received from Server
{
"draw": null,
"data": [
{
"DT_RowId": "row_26",
"users": {
"site": 1,
"first_name": "ALI",
"last_name": "ADNAN",
"phone": null
},
"sites": {
"name": "Edinburgh"
}
}
],
"recordsTotal": null,
"recordsFiltered": null,
"error": null,
"fieldErrors": [],
"id": null,
"meta": {},
"options": {
"users.site": [
{
"value": 1,
"label": "Edinburgh"
},
{
"value": 2,
"label": "London"
},
{
"value": 6,
"label": "Los Angeles"
},
{
"value": 4,
"label": "New York"
},
{
"value": 3,
"label": "Paris"
},
{
"value": 5,
"label": "Singapore"
}
],
"permission[].id": [
{
"value": 6,
"label": "Accounts"
},
{
"value": 3,
"label": "Desktop"
},
{
"value": 1,
"label": "Printer"
},
{
"value": 2,
"label": "Servers"
},
{
"value": 4,
"label": "VMs"
},
{
"value": 5,
"label": "Web-site"
}
]
},
"files": {},
"upload": {
"id": null
},
"debugSql": null,
"cancelled": []
}
and its available to update
see images
How to solve this problem ? please guide me.
I dont have any public available server to upload my project, but I am sure same can be reproduce as you need to only truncate users table and check.
Best Regards
This question has an accepted answers - jump to answer
Answers
This appears to be a duplicate of this thread. I've replied there already, so I'll close this discussion.
Allan