Update fields when an item is selected in the datagrid