Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Virtual Mode like System.Windows.Forms.ListView  (Read 423 times)

0 Members and 1 Guest are viewing this topic.

Filippo

  • Guest
Virtual Mode like System.Windows.Forms.ListView
« on: April 20, 2011, 06:54:43 AM »
Hi,

  I need the behaviour of VirtualMode property of  System.Windows.Forms.ListView control.
  I need to set a "VirtualTreeSize" and an event like RetrieveVirtualItem to build data on demand.

  Is it possible right now or it's a new feature to implement?

  Thank you,
    Filippo.

Ruslan

  • Flexible TreeView Team
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 569
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #1 on: April 20, 2011, 09:38:26 AM »
Hello and welcome to the forums.

This features already implemented as load on demand, which you can enable for every separate node by using the node.LoadOnDemand property.
To load children nodes manually please enable the specified property for all root nodes and subscribe to the treeview.NodeExpanding event where load children nodes for such node:
Code: [Select]
someNode.LoadOnDemand = true;

private void tree_NodeExpanding(FlexibleTreeView pTreeview, NodeExpandingEventArgs pArgs)
{
  if (pArgs.Node.LoadOnDemand)
  {
    pArgs.Node.LoadOnDemand = false;
 
    // load node`s children here...
  }
}

You can enable this mode for the bound nodes (when treeview is bound to a data source) as well.

Feel free to contact us if you have other questions.

Filippo

  • Guest
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #2 on: April 20, 2011, 06:40:18 PM »
Thank you for your reply,
  is it possible to demand loading not only subitems but also nodes attached to the root?
  I need to set a virtual length, for example 1.000.000 items (flat structure), see the scrollbar resize accordantly.
  When I scroll I'd like to load only needed data, only 10-20 visible items. Like pagination when you access to a huge database table.

  Thank you,
    Filippo.

Ruslan

  • Flexible TreeView Team
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 569
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #3 on: April 21, 2011, 01:56:49 AM »
Unfortunately, Flexible TreeView doesn`t support such functionality. On the other hand, in the forthcoming release which will be available soon we`ve greatly optimized the control performance so it easily manage 1 000 000 items (now it takes only 4.8 seconds to attach such huge data source to the treeview). So if your table is available to read all items at once this may be the way to go. Of course this way consumes more memory comparing with a virtual tree.

Filippo

  • Guest
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #4 on: April 21, 2011, 08:39:29 AM »
Ok, I have supposed that.

Just last question: do you think that it's impossible to develop (architectural speaking) or it's only due to lack of time? Or for you this is not an interesting develop task to do?

Thank you for you time,
  Filippo.

Filippo

  • Guest
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #5 on: April 21, 2011, 10:00:37 AM »
Sorry,
  fill free to don't answer to my last questions. I just need to know if I need to search for another solution or I have just to wait for a future implementation.

  Anyway now I'm a new Flexible TreeView customer ...  ;D

  Have a nice day,
    Filippo.

Ruslan

  • Flexible TreeView Team
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 569
Re: Virtual Mode like System.Windows.Forms.ListView
« Reply #6 on: April 21, 2011, 03:29:26 PM »
Hello Filippo,

Welcome on board!
Frankly speaking we don`t have requests for such feature so did not any time-to-develop measurements. At a first and quick review, we need some architectural changes and some time to code this feature. If other users vote for this feature we`ll take a closer look at what we need to provide such feature.

Please contact us if you have any other questions.
 

Copyright © 2006-2012 ARMSoft. All rights reserved.