X-ray diffraction is known to be an effective technique for illicit materials detection in baggage screening, as it can reveal molecular structural information of any solid substances but also of liquids, aerosols and gels. Some X-ray diffraction systems using 2D pixelated spectrometric detectors, such as CdZnTe detectors, are then able to perform 3D baggage scanning in time compatible with bag throughput constraints of airports. However, X-ray diffraction systems designed for baggage screening generally suffer from poor photon count statistics and bad spatial resolution, because of the tight collimations and the small scattering angle. To improve these factors, techniques of sub-pixelation can be implemented in CdZnTe detectors. Indeed, sub-pixelation enables to open the collimation without angular resolution degradation and also to segment the inspected volume in several sub-volumes, inducing a better spatial resolution in the X-ray beam direction. In this paper, we present some experiments demonstrating the interest of sub-pixelation within CdZnTe detectors for X-ray diffraction imaging systems. In particular, an experimental demonstration is presented with a 2D XRD image of a realistic baggage performed with only one single pixel from our own CdZnTe based imager.