a better way using existing code

updated to use existing code in the jgrid namespace