added code for multi page availability grid