replace grid in one file