grid filter string to sql query