I get this error when trying to save a value to the entity item 'ProductId'.
THE FOLLOWING CODE EXECUTES WITH NO ERROR.....
ProductionRequestItemEntity item = new ProductionRequestItemEntity();
item.StudentName = txtStudentNameItem.Text.ToString();
item.CameraCard = txtCameraCard.Text.ToString();
item.JobId = Convert.ToInt32(txtJobId.Text.ToString());
item.Quantity = Convert.ToInt16(txtQuantity.Value);
item.UpdatedBy = Common.UserInfo.Username;
item.PackageProductId = Convert.ToInt32(drpProduct.ActiveRow.Cells["Id"].Value);
THIS NEXT LINE OF CODE YIELDS THE ERROR
The field 'ProductId' is read-only and can't be changed.
item.ProductId = Convert.ToInt32(drpProduct.ActiveRow.Cells["Id"].Value);
What is it that could cause this error?
Thanks,
Dan