Short and simplistic answer.
The pain in cancer is usually due to the location of the tumour, pressing against other organs, blood vessels, or nerves within the body. The other common source of pain in cancer often comes from the treatment with either chemotherapy or radiotherapy. So, in the early stages, patients may well be diagnosed with cancers consisting of solid tumours in their early stage of development and these may very well be painless.
For similar reasons, it may be possible to be diagnosed with a cancer without any obvious symptoms.