Light scattering by a grating made of the Ag nanocylinders onto a dielectric substrate is investigated using an accurate and rigorous formalism based on a recursive algorithm combined with the lattice sums technique. Physical insight is given to the localization of the field along the interfaces of the Ag nanocylinders, to the strong reflected field by the grating and the field enhancement at the surface of the dielectric substrate. The accuracy of the numerical analysis has been validated based on the principle of the energy conservation.