You are not logged in.
Hello
I'm experimenting with the Mongo driver part of Mormot. For easy data visualization I wanted to connect a DB grid (TMS TDbAdvGrid actually) through a data set to a Mongo collection. It seems to be very simple with the TSynVirtualDataSet classes, but the problem is that the grid only shows the first record.
The connection is done like this:
var
Docs: TVariantDynArray;
begin
fDocsColl.FindDocs(Docs, null);
TmsGrid.DataSet := ToDataSet(Self, Docs, [], []);
...
Now, this might not be a limitation in the mOMot code, because the standard TDBGrid works properly and shows all the records. The TMS one doesn't. The Docs array contains all the records so the query works.
However, the TMS grid so far has been working with all datasets and this is the first time I have seen this issue.
So I wonder if some methods might be needed that are not implemented in the mORMot TDataSet descendant? The TMS grid has properties for working with paged and sequential/non-sequential datasets, but they don't fix the problem.
Any ideas what the cause could be?
Thanks
Offline
Thanks, linking it with ToClientDataSet shows all the data. But what does that mean regarding the TDataSet, why it doesn't work with it?
I don't see a similar Mongo related function.
Well, I guess that I could convert the variant array to JSON and then to a TClientDataSet with JSONToClientDataSet. Its a couple of lines and it should work, but it's a lot of copying of data.
Offline