The invention relates to a grating device (1) for an X-ray imaging device, an interferometer unit (2), an X-ray imaging system, an X-ray imaging method, and a computer program element for controlling such device and a computer readable medium having stored such computer program element. The grating device (1) for an X-ray imaging device comprises a grating arrangement (10) and an actuation arrangement. The grating arrangement (10) comprises a plurality of grating segments (11). The actuation arrangement is configured to move the plurality of grating segments (11) with at least a rotational component between a first position and a second position. In the first position, the grating segments (11) are arranged in the path of an X-ray beam (30), so that the grating segments (11) influence portions of the X-ray beam (30). In the second position, the grating segments (11) are arranged outside the portions of the path of an X-ray beam (30), so that the portions of the X-ray beam (30) are unaffected by the grating segments (11).