Assign Datagrid values to Datagrid instance

Hi,
I have made an instance of a Datagrid, but my code cannot recognize the properties in the Datagrid class. Picture is under

I am using the following

Screenshot 2021-11-22 at 09.59.07

I got it to work, dont know how