DataGrid Looping

I want to loop through all of the rows in the DataGrid component…
Is there either a way I can loop through it using properties of the component. Or is there a way I can find out the number of Rows a datagrid currently has displayed?