[-] optimized isCanOverflowInMainDirection and isCanOverflowIn2Direction functions
[-] fixed dataGrid counters error