In some western action TV/Movie dramas, a box of dynamite is exploded by a rifle bullet. I do not think this would happen. A container of nitro-glycerin is likely to explode due to an impact. Nitrogen chloride is extremely volatile & explodes due to impact or even strong sunlight. Dynamite is a mixture of nitro-glycerin invented to provide a safe explosive requiring a detonator.