Replaced gridInqNumber()/gridDefNumber() by cdiInqKeyInt()/cdiDefKeyInt() with CDI_KEY_NUMBEROFGRIDUSED.