Already been answered that you need to go to immigration to cancel ED. Separately, I'm in a similar situation and called the immigration hotline to ask if it is a requirement to cancel an ED visa before applying for a DTV. They confirmed that you can cancel it either before or after and you can apply for the DTV even with an active ED visa. If it will help for others to validate you may call 1178 from Thailand.
I wanted to add to this for reference of others that I called the Immigration Hotline and they confirmed that you can cancel your ED visa after your DTV is approved. It shouldn't be a problem. If it will help for others to validate you may call 1178.