The question needs precision since lots of manipulation could be done on the data between the data source and the final output. Converters could be set on bindings to alter the data, templates could be used to alter the visual display, culture and string formats could convert values to string differently, etc.
However, no matter your answer, our answer will probably be that it is not possible because the grid is doing UI virtualization. In such case, the number of cells is limited to the viewport.
It is possible to disable UI virtualization, but the grid’s performance will most probably suffer. The initial question remains, what is the “data from the grid”? There is the data from the data source, the data from the cell’s content, the data from the cell’s viewer or cell’s editor, etc.