TMyTable 9.3.9 MariaDB, Delphi 10.3
How do I get the values from a multiselected grid?
the standard way GotoBookmark(Pointer(DBGrid1.SelectedRows.Items));
does not work. I found this on the Embarcadero forum from 2 years ago
Grid.Datasource.DataSet.GotoBookmark(TArray(Pointer(Grid.SelectedRows.Items)));
When I try it:
dsRepeatServiceDates.DataSet.GotoBookmark(TArray(Pointer(grdRepeatServiceGrid.SelectedRows.Items)))
I get an error [dcc32 Error] uRepeatServicesGrid.pas(97): E2003 Undeclared identifier: 'TArray'
I have System.SysUtils declared in my uses clause
After checking the Delphi documentation I tried adding System.TArray to the uses and got
[dcc32 Fatal Error] uRepeatServicesGrid.pas(10): F2613 Unit 'System.TArray' not found.
Any help would be appreciated
Gary
Multiselect grid
-
- Posts: 5
- Joined: Tue 22 Jan 2019 06:29
Re: Multiselect grid
Solved in Idera Embarcadero forum
Pointer must be cast to a Byte array so TArray<Byte>, or TBytes or TBookmark witch is an alias for a TByte array
dsRepeatServiceDates.DataSet.GotoBookmark(TBookmark(Pointer(grdRepeatServiceGrid.SelectedRows.Items)));
Pointer must be cast to a Byte array so TArray<Byte>, or TBytes or TBookmark witch is an alias for a TByte array
dsRepeatServiceDates.DataSet.GotoBookmark(TBookmark(Pointer(grdRepeatServiceGrid.SelectedRows.Items)));
Re: Multiselect grid
It is good to see that the problem has been solved.
Feel free to contact us if you have any further questions about our products.
Feel free to contact us if you have any further questions about our products.