If you are talking about plain, raw cast iron that has to be seasoned then, no, do not clean it in the dishwasher. It will remove the seasoning and you'll be back to square one. I have a skillet that it easily 100 years old and I suspect the seasoning is close to that age. It's nearly like the finest Teflon on the market.
Not plain old cast iron but enamel-coated cast iron instead...not sure I'd put that in the dishwasher either. You'd have to check with the manufacturer's recommendations. My gut says, "No."
Looks like soaking and good old elbow grease will be your best options.
"As a girl I had zero interest in the stove." - Julia Child
This is real inspiration. Look what Julia became!