Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom sort order for children nodes in TreeLayout (Read 1723 times)
newbieDraw
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Dec 22nd, 2011
Custom sort order for children nodes in TreeLayout
Jun 3rd, 2014 at 3:36pm
Print Post  
Hi Stoyo,

w.r.t TreeLayout, is it possible a implement a custom sort order for the children nodes based on some custom properties specified in the derived node class?

Thanks,

Parijat
  
Back to top
 
IP Logged
 
newbieDraw
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Dec 22nd, 2011
Re: Custom sort order for children nodes in TreeLayout
Reply #1 - Jun 3rd, 2014 at 5:18pm
Print Post  
Never mind, figured out. Implemented sorting using custom comparison delegate at link creation.

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom sort order for children nodes in TreeLayout
Reply #2 - Jun 3rd, 2014 at 5:48pm
Print Post  
Right, the child order corresponds to the order of links in parent.OutgoingLinks, so you can either create the links in the expected order, or later call parent.OutgoingLinks.Sort(comparer).
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint