I want to use Grid.DataValue with this record (Read/write)
TData=record
User:string;
end;
Write into Grid.DataValue:
Data:TData;
Data.User:='Test';
Grid.DataValue:=TValue.From<TData>(Data);
Read from Grid:
Data:=Grid.DataValue.AsType<TData>;
No data found… Seems Grid.DataValue is defined as const what makes no sense…
The same works fine with AValue:TValue instead of Grid.DataValue:
AValue:=TValue.From<TData>(Data);
Data:=GAValue.AsType<TData>;
Data.User='Test'
Pieter
(Pieter)
March 30, 2026, 10:20am
2
Hi,
DataValue is a class helper property for inplace editors. It of course is enabled for TTMSFNCDataGrid, but doesn’t do anything. Can you provide some context on what you want to use it for? Alternatively, take a look at DataObject
My intention is to store all the grid “control” properties in a single place.
Example: Colors, sorting directions, numer formats, …
There are more than 100 grids in my app, each one has 20..50 settings to control the look and functionality - no way to do all that stuff manually…
Pieter
(Pieter)
March 30, 2026, 12:55pm
4
True, DataObject would be the ideal place for that.