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 

column order

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



Joined: 19 Jan 2007
Posts: 44

PostPosted: Sun May 11, 2008 12:06 am    Post subject: column order Reply with quote

Most of my columns are movable, and I need to provide a feature to save the order user has been made, so the application can show the same column order in the next session.
Could you tell me how to get the current UI column order (virtualTree1.Columns only returns the binding order)? And is any way I can change the column order after all columns have been added?

Thanks.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun May 11, 2008 3:38 am    Post subject: Reply with quote

The order of the column in the columns collection does determine their UI display order. However you should look at the VirtualTree.WriteXml and ReadXml methods. These save and restore the column order, column sizes and other virtual tree state. The Data Set Browser sample illustrates how to use these methods.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
billcch



Joined: 19 Jan 2007
Posts: 44

PostPosted: Tue May 27, 2008 11:05 pm    Post subject: How can I know if column reorder is completed. Reply with quote

We are saving column data after column has been reordered, to do this, we currently raise VirtualTree.WriteXml method one second AFTER received DragDrop event from VirtualTree (which means we are using a delay timer thead).
Does VirtualTree provde events to notify columns have been reordered (and completed)?
Back to top
View user's profile Send private message
billcch



Joined: 19 Jan 2007
Posts: 44

PostPosted: Thu Jun 05, 2008 2:41 am    Post subject: Did you forget me? Reply with quote

Did you forget me?

I still don't know how to solve this issue...

Quote:
We are saving column data after column has been reordered, to do this, we currently raise VirtualTree.WriteXml method one second AFTER received DragDrop event from VirtualTree (which means we are using a delay timer thead).
Does VirtualTree provde events to notify columns have been reordered (and completed)?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Jun 05, 2008 8:19 am    Post subject: Reply with quote

Sorry we must have missed your last post somehow.

Normally you would only call VirtualTree.WriteXml in the Form.OnClosed() method/event. That way you only have to do it once and you save all the changes made. The VirtualTree.Columns collection supports the IBindingList interface so you can hook the ListChanged event which will be fired when the columns collection is changed.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
billcch



Joined: 19 Jan 2007
Posts: 44

PostPosted: Fri Jun 06, 2008 12:12 am    Post subject: Reply with quote

Thanks, because we have function to change data binding within a session, so we need to save user changes not only when application is shutting down. I will trying to use ListChanged event to handle it. Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support 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