Edge version of metric dimension for the families of grid graphs and generalized prism graphs