Transparent electrically-conductive nanoporous thin films can be used as electrodes to attract dye ions from solution to modulate the reflectance of a surface. Here we demonstrate that this technique can be used to create diffraction gratings that can be modified by the application of a small electrical potential with a selected spatial distribution. Using nanoporous ITO films fabricated by Glancing Angle Deposition, we have produced variable diffraction gratings, fabricated by a variety of methods, including lithography combined with etching techniques or direct patterning using focused ion beam etching. We demonstrate modulation of the diffraction pattern by employing electric force to attract the dye ions into the nanoporous electrode, thereby introducing a substantial local change in the effective refractive index value and thus altering the resultant diffraction pattern and, in some cases, yielding diffractive orders that lie between those associated with the underlying grating. These new orders are easily distinguished and their intensity can be substantially modified by controlling the applied voltage. Because this technique can work with very small pitch gratings, this approach has the potential to enable new applications that may not be readily achieved using conventional liquid crystal technology.© (2007) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.