Update dynamic grid

Various bug fixes, sync with latest version from Wonderflux.