Scattered radiation is a major cause of image quality degradation in flat panel detector-based cone beam CT (CBCT). While recently introduced 2D antiscatter grids reject the majority of scatter fluence, the small percentage of scatter fluence still transmitted to the detector remains a major challenge for implementation of quantitative imaging techniques such as dual energy imaging in CBCT. Additionally, this residual scatter is also a major source of grid-induced artifacts, which impedes implementation of 2D grids in CBCT. We therefore present a new method to achieve both robust scatter rejection and residual scatter correction using a 2D antiscatter grid; in doing so, we expand the role of 2D grids from mere scatter rejection devices to scatter measurement devices. In our method, the radiopaque septa of the 2D grid emulate a micro array of beam-stops placed on the detector which introduce spatially periodic septal shadows. By selecting sufficiently thin grid septa, the primary intensity can be reduced while preserving the uniformity of scatter intensity. This enables us to correlate the modulated pixel signal intensity in septal shadows with local scatter intensity. Our method then exploits this correlation to measure and remove residual scatter intensity from projections. No assumptions are made about the object being imaged. We refer to this as Grid-based Scatter Sampling (GSS). In this work, we evaluate the principle of signal modulation with grid septa, the accuracy of scatter estimates, and the effect of the GSS method on image quality using simulations and measurements. We also implement the GSS method experimentally using a 2D grid prototype. Our results demonstrate that the GSS method increased CT number accuracy and reduced image artifacts associated with scatter. With 2D grid and residual scatter correction, HU nonuniformity was reduced from 65HU to 30HU in pelvis sized phantoms, and HU variations due to change in phantom size were reduced from 59HU to 20HU, when compared to use of only a 2D grid. With residual scatter correction via GSS method, grid-induced ring artifacts were suppressed, leading to a 41% reduction in noise. The shape of the modulation transfer function (MTF) was preserved before and after suppression of ring artifacts. Our grid-based scatter sampling method enables utilization of a 2D grid as a scatter measurement and correction device. This method significantly improves quantitative accuracy in CBCT, further reducing the image quality gap between CBCT and multi-detector CT. By correcting residual scatter with the proposed method, grid-induced line artifacts in projections and associated ring artifacts in CBCT images were also suppressed with no compromise of spatial resolution.