If you use the synchronous version of Parallel.ForEach (the default one; i.e. if you don't use the NoWait specifier) then you can simply access the GridMat through variable capture.
Something like this should just work:
Parallel.ForEach(1, XRes).Execute(
procedure (const i: integer)
var
j: integer;
begin
for j := 1 to XRes do
GridMat.Elem[i,j] := StrToFloat(ListOfValues[(i-1)+((j-1)*Xres)]);
end);