Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Event: ColumnReordered

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Feature Requests
View previous topic :: View next topic  
Author Message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Mon Aug 04, 2008 6:15 pm    Post subject: Event: ColumnReordered Reply with quote

Hi,

I'm currently evaluating your control, and I noticed that a ColumnReordered event is missing, although even the standard ListView has such an event.
Could something like this be added?
Preferably, there would be both a ColumnReordered and a ColumnReordering event. Unfortunately, the ColumnReordered event from the standard ListView is bugged and is in fact a ColumnReordering event which makes things unnecessarily difficult.

Regards,
Florian
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 04, 2008 10:26 pm    Post subject: Reply with quote

Virtual Tree has the SortColumn changed event which is raised when the sort column (or order of the sort column) is changed.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Mon Sep 01, 2008 6:33 am    Post subject: Reply with quote

I have just tried this event, but it doesn't do what I need. I need an event which fires when *any* column has been moved to a new location, not necessarily a sort column.

Also: Why don't you have a default sorting feature? Basically, 99% of the data you usually put into a list view (or tree view) could be sorted using the IComparable interface. In your samples however, you define a FileInfoComparer and DirectoryInfoComparer which is rather complex and wouldn't be necessary.
As an example, a free control which does that is the ObjectListView - once you have defined the binding, it is able to sort virtually any data you put into it automatically (and there is not much code involved with this). This is really really useful Smile
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Sep 01, 2008 9:31 am    Post subject: Reply with quote

Quote:
I have just tried this event, but it doesn't do what I need. I need an event which fires when *any* column has been moved to a new location, not necessarily a sort column.


You can attached to the VirtualTree.Columns.ListChanged event to get notification of when a column has been moved or changed (rather than sorted).

Quote:
Also: Why don't you have a default sorting feature? Basically, 99% of the data you usually put into a list view (or tree view) could be sorted using the IComparable interface. In your samples however, you define a FileInfoComparer and DirectoryInfoComparer which is rather complex and wouldn't be necessary.


The reason Virtual Tree doesn't implement a default sorting mechanism like you describe is because the only way to implement sorting at this level requires iterating through every row of the tree. This would defeat the primary design goal for Virtual Tree which is performance. If your data is coming from a database then it is much more efficient to have the database do the sorting for you (using its indexes) then to extract the data and sort it using IComparable.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group