I'm having trouble with one particular grid column. The grid is the detail side of a master-detail, therefore needs to have a hidden column with the default value equal to the parent's key. The razor source is
<e-column field="OrderID"
visible="false"
type="number"
[email protected] />
I can see in the page source that the value is correct:
{"field":"OrderID","type":"number","visible":false,"defaultValue":122}
but when the insert is sent back to the server, it has a different value:
{"value":{"OrderID":40,"Name":"Apple Bread","Quantity":1,"Sliced":0,"LightBake":false,"Plastic":false, "Bulk":0,"Notes":null,"ProductID":24},"table":null,"action":"insert","antiForgery":""}
This value, 40, is the same across multiple runs of the web app, and across client computers and servers.
I don't do anything to set this value other than the default-value attribute; i.e., i don't have any scripts client-side that would change it. Other columns that have a default-value, such as Quantity, Sliced, and Bulk have their proper values.
I have not been able to reproduce it in a sample app, and I'm hesitant to send my actual project, as it's pretty large. Do you have any suggestions where I should look to fix this problem? Is there any chance that there's an unobfuscated JS file available so that I could debug into the EJ source?
Thank you again for your help.
Brian
|
<ej-grid id="Grid" allow-paging="true" allow-filtering="true" selectiontype="Multiple" action-complete="complete">
-------------------------
<e-columns>
<e-column field="OrderID" is-primary-key="true" visible="false" default-value="122"></e-column>
<e-column field="EmployeeID" header-text="EmployeeID" default-value="9"></e-column>
<e-column field="Freight" header-text="Freight" default-value="4.00"></e-column>
</e-columns>
</ej-grid>
|