Let be a proper -coloring of a connected graph and be an ordered partition of into the resulting color classes. For a vertex of , the color code of with respect to is defined to be the ordered -tuple , where for . If distinct vertices have distinct color codes, then is called a locating coloring. The minimum number of colors needed in a locating coloring of is the locating chromatic number of , denoted by . In this paper, we study the locating chromatic numbers of grids, the cartesian product of paths and complete graphs, and the cartesian product of two complete graphs.