display id in editor
display id in editor

I added the ID field as read-only to the editor
{ "label": "SubmissionID:", "name": "Submissions.SubmissionID" , type:"readonly" },
but I am getting the error:
Cannot update identity column 'SubmissionID'.
Is it not possible to view the ID field in the editor?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
That should work, I modified this example locally to contain:
and that gave the read-only ID on the form as expected, with no errors on edit or create.
Are you able to link to your page so we can take a look?
Colin
sorry, the page is on our intranet.
This thread has the same error, so it would be worth checking Allan's comments there.
Colin
Yes, that was it exactly! Thank you.
asp.net - in my controller:
I just stumbled upon what appears to be a different solution.
https://editor.datatables.net/reference/option/fields.submit
Is there any advantage of doing it one way over the other (controller vs. javascript)?
The controller would be more secure - it's always best to sanitise the data nearest the database, as less change of people finding ways to circumvent. Other than that, I don't think it matters too much,
Colin