My personal advice: Get thee to a lawyer. Tricky though, need to find one who specializes in both domestic and gun law.
Preemption won't apply, a court is not a locality. This is going to require more court time.
TFred
ETA: Could be a very interesting case though, would certainly make a lot of news, and may garner outside support.
15.2-915 only applies to "administrative" regulatory powers; moreover, the term, "locality", means "a county, city, or town as the context may require." (15.2-102), expanded in 15.2-915 to include local authorities, departments & governmental entities, except those that are controlled by the state government. The district courts are run administratively by a state department, but control themselves and are funded both by the local government and by the state. I think they function in a way that is analogous to the term, "authority".
My opinion is that a district court has the power to create remedies pursuant to statutes governing child support & custody, but lacks the power to make or enforce administrative regulations regarding firearms. A Circuit court, on the other hand, has inherent and statutory authority to create administrative regulations to enhance the security of the court systems in that circuit, as well as to fashion remedies. But because the statutes controlling custody don't mention firearms, and 15.2-915 requires an explicit reference to firearms, the court lacks the power to make orders relating to firearms absent specific statutory authority.
Did you note your appeal to the circuit court? I'd at least argue that the J&DR court lacked the authority to impose that regulation arbitrarily. I think this is one of those gray, interstitial areas in the code where the legislature didn't consider every possible situation in which one might think of applying a particular statute.
Practical application: can you imagine a world in which a Virginia Circuit Court is going to order a district judge to stop issuing orders governing firearm possession and providing a plaintiff with an award of attorneys' fees?