The iPad will charge from anything that provides power over a USB connection per the specs. However, the iPad likes to negotiate an out-of-spec power draw, which it can from certain Macs, or the charger it comes with. With those devices it can both charge and be run at the same time.
With normal USB power it can either charge, or run, but not both. So if you run it you will see a notification that it is not charging. When you deactivate the iPad it actually will charge (but you can't see the notification that it is doing so).