programatically populate grid and change color on click