We study the electro-optic (E-O) properties of a BaTiO 3 thin layer placed in a stack of dielectric layers, including a subwavelength diffraction grating with a two-dimensional periodicity, aiming to tune spectrally the position of the resonant reflection peak that is used for narrowband optical filtering. BaTiO 3 is chosen due to its strong E-O properties. When an external electric field is applied to the E-O layer, it leads to a spectral shift of the resonant peak. We study numerically different configurations with either weak or strong spectral tunability, presenting some arguments to explain these different behaviors. Taking into account only the linear part of the E-O effect (Pockels effect), the tuning of the peak that has 0.1 nm spectral width is approximately 33 nm for a 1.5 × 10 7 V∕m applied field. The shift is multiplied by three (97 nm) when also taking into account the quadratic E-O effect.