We numerically investigate the properties of a hybrid grating structure acting as a resonator with ultrahigh quality factor. This reveals that the physical mechanism responsible for the resonance is quite different from the conventional guided mode resonance (GMR). The hybrid grating consists of a subwavelength grating layer and an un-patterned high-refractive-index cap layer, being surrounded by low index materials. Since the cap layer may include a gain region, an ultracompact laser can be realized based on the hybrid grating resonator, featuring many advantages over high-contrast-grating resonator lasers. The effect of fabrication errors and finite size of the structure is investigated to understand the feasibility of fabricating the proposed resonator.