Thank you very much for your answer.
This is exactly what I did. The exception is that if there are no child
nodes I don't remove the dummy and simply let it show. The dummy has no text,
just a broken line ending in empty space making an impression of nothing to
chose from.
"Tobin Harris" wrote:
> "Cezar" <(E-Mail Removed)> wrote in message
> news:103B61C3-821F-45A6-B078-(E-Mail Removed)...
> > The MSDN has an article titled:
> > Without the Expandable property the node doesn't have the ability to
> > expand
> > if you don't feed the sub-nodes during the tree creation. In other words
> > the
> > node doesn't have the 'plus' box to trigger the 'Expand' request. If the
> > subnodes are supposed to be provided only on the expand request, then you
> > are
> > stuck.
> > Is there any workaround for this problem?
> > Thanks
> > Cezar
>
> I have a work around that I've used in several programs (for example, see
> the lazy-loading database tree view in SqlBuddy (sqlbuddy.sourceforge.net).
>
> The work around is to add a dummy node to each parent node that you want to
> lazy load. This forces the "+" to appear on these parent nodes. Then, in the
> afterexpand event, first see if there is a "dummy" node under the parent. If
> so then delete it (you don't want the user to see it). Then do your lazy
> loading to add the real child nodes. A nice side-effect is that, if there
> aren't any child nodes to lazy load, the "+" will dissappear (since the
> dummy has been removed).
>
> Hope this helps
>
> Tobin
>
>
>
|