I have chondromalacia patellae (bad knees) can I do dancing?

Yes, but do some PT. You would benefit from physical therapy to optimize strength/endurance/flexibility/coordination in your lower extremities and core; taping or bracing may help for more strenuous activity; see a sports med/knee specialist for specific recs re how to stay active and keep your knees pain free; make your rehab exercises part of your regular exercise routine and you should be able to go dancing.
Might be a prob. Treatment consists of activity modification, ice, anti-inflammatory meds and therapy aimed at flexibility and strengthening, especially of your core. Dancing may cause symptoms to worsen. Try above and slowly introduce dancing. If symptoms worsen, then refrain a bit longer.

Related Questions

Left knee for over 4 years now. Doctor diagnosed me with chondromalacia patellae, what to do?

Therapy. Chondromalacia patella (runners knee) is due to overload of the patellofemoral joint (knee cap against the end of the thigh bone). Running caused high forces in this portion of the joint. So does arising from a chair, going up/down stairs. Treatment consists of activity modification, ice, anti-inflammatory meds and therapy aimed at flexibility and strengthening, especially of your core.