Add on click event handler for grid cells