add grid directive
ref #3779
Merge remote-tracking branch 'origin/master'