Yes, in the laboratory, a grain is a unit of weight but in the inexact world of blackpowder it also used as volume because the most common form of blackpowder was very close to 100 grains volume equalling 100 grains weight.
There is a quote from here - ww.chuckhawks.com/blackpowder_volumetric.htm
"The geometry of blackpowder itself varies by its own granulation size; Fg, FFFg, FFFFg, and so forth. Trying to measure blackpowder (or anything else) by its bulk is tricky. Blackpowder varies all over the place by geometry, moisture content, and even composition percentages. Ian McMurchy published actual weight of 100 gr. volumetric Goex FFg as 101.3 grains (weight), 100 gr. volumetric Goex FFFg as 101.6 grains(weight). (Page 81, Modern Muzzleloading For Today's Whitetails.) Mr. McMurchy didn’t stop there; Pyrodex Select (which is a very large granulation size) weighs in at 63.9 grains, Pyrodex RS at 72.5, Pryrodex P at 73.0, Pyrodex pellets at 74.2, Arco at 94.7, Clean Shot at 85.1, and Quick Shots at 65.5 grains of actual weight."
Hope that helps.
Cheers