The peculiar property of reversible change of the refractive index (Δn) of photochromic systems, is suitably exploited to realize volume phase holographic gratings (VPHGs), which are finding applications in optics and in spectroscopic instrumentations. A large modulation of the refractive index between the two photochromic states and a relatively thick layer of good optical quality are the fundamental requirements for the materials to achieve a good diffraction efficiency. A backbone diarylethene polymer which combines good processing properties with a proper photochromic sensitivity is synthesised and studied. The large Δn between the two isomer states (i.e. Δn=0.03 measured at 1500 nm and the value is even higher at shorter wavelengths, approaching 0.1 near the visible) and the high transparency in the near infrared range make it a promising substrate for the realization of efficient VPHGs. First prototype of VPHGs based on photochromic diarylethene polymer films has been written by transferring the pattern of lines from a master and its functionality is shown.