An x-ray detector of a grid-based phase-contrast x-ray device and a method for operating a grid-based phase-contrast x-ray device. Signal values of detector elements are combined to form group signal values. An image computing unit calculates an x-ray beam phase value from the group signal values.