How to: load array into DataGrid column?

Hi.

I’m making a simple XML viewer. It simply loads an XML file and displays it in a DataGrid component. However I wanted to add a column at the beginning displaying the row number. How can I do that easily? I was thinking of having a array with numbers [1, 2, 3, 4, 5]. But I suspect it is possible to do something like

for…
myDataGrid.row*.rowNumber = i;

Thanks in advance!