We report on experiments in nanopatterning electron beams from a photoinjector as a first step toward a compact XFEL (CXFEL). The nanopatterning is produced by Bragg diffraction of relativistic electron beams through a patterned Si crystal consisting of alternating thick and thin strips to produce nanometer-scale electron density modulations. Multi-slice simulations show that the target can be oriented for a two-beam condition where nearly 80% of the elastically scattered electron beam is diffracted into the 220 Bragg peak. An experiment at the two-beam condition measurement has been carried out at the SLAC UED facility showing this effect with 2.26 MeV electrons. We successfully proved a large portion of the main beam is diffracted into 220 spot by tuning the orientation of the sample. Future plans at UCLA are to observe the nanopatterned beam, and to investigate various grating periods, crystal thicknesses, and sample orientations to maximize the contrast in the pattern and explore tuning the period of the modulation. The SLAC measurement results will be presented along with design of the UCLA experiments.