Fix the GridItem outofIndex

Signed-off-by: Pengcheng Bian <pbian@actuate.com>