Using Delphi XE8 I’m currently testing functionality with Firemonkey TListViews.
One thing I’m trying to do is to load a field of all records from a TFDMemtable component into a Listview Item, specifically into the DetailObject of the ListView Item.
For example, I have 3 records in a table (db field is called ‘Name’):
Record 1 = Name 1
Record 2 = Name 2
Record 3 = Name 3
There is only 1 DetailObject property per ListView Item so my question is, would I be able to add all of the fields (Name 1, Name 2, Name 3) into that one DetailObject?
Below is what I’ve attempted so far but no luck. Not 100% sure what I need to do.
var LItem : TListViewItem;
LItem := ListView1.Items.Add;
LItem.Objects.DetailObject.Visible := True;
with memtable do
while not eof do
LItem.Detail := FieldByName(‘Name’).AsString;
I’m sorry if this isn’t clear enough, please let me know.
Any help would be great.