ralph
7/9/2011 4:31:00 AM
On Fri, 08 Jul 2011 12:48:21 +0100, MM <kylix_is@yahoo.co.uk> wrote:
>Everything I've read up so far about the MSHFlexGrid involves an ADO
>RecordSet, either directly as DataSource, or via an ADO DataControl
>(AdoDC1).
>
>Is there any way of filling the hierarchical flexgrid with Additem so
>as to create a hierarchy? That is, with the expand/collapse feature
>where you click on the + to expand the view.
>
> <snipped>
>
>I suppose I could create a disconnected recordset in code by applying
>some kind of SHAPE statement to build it, but usually I add items to a
>grid by using AddItem.
>
>MM
That would be the way to create an independent (non-database) data
storage for a MSHFlexGrid.
In general terms ... the reason you can't use an "AddItem" type method
is because the control does not have a separate storage for its data,
but rather assumes it will be 'bounded' to a DataSource. It acts as a
Data Consumer.
Creating a disconnected recordset is not as 'over-kill' as it might
first appear. To create your own shaped data storage from scratch that
could be used by the MSHFlexGrid would not be a non-trivial exercise.
-ralph