Bug 1012578 - Abstract grid rendering logic for use in multiple apps