grid working with selection