LookupTable on Grid not working

Hi, I’m trying to connect a LookupTable on a Grid(like one from examples). I have seen some tutorial and I have done what was in there, but it still not working.

I have defined a new lookup table like this

    vtkSmartPointer<vtkLookupTable> lut =
vtkSmartPointer<vtkLookupTable>::New();

lut->SetNumberOfTableValues(x.size() * y.size());
lut->SetTableValue(0, colors->GetColor4d("Orange").GetData());
lut->Build();

and connected with the grid through the mapper, like this

    rgridMapper->SetLookupTable(lut);
rgridMapper->SetUseLookupTableScalarRange(true);
rgridMapper->SetScalarModeToUsePointData();

Anyway it’s still not working. Why is it happening? How could I set a lookup table on a grid? Thanks