View previous topic :: View next topic |
Author |
Message |
billcch
Joined: 19 Jan 2007 Posts: 44
|
Posted: Sun May 11, 2008 12:06 am Post subject: column order |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun May 11, 2008 3:38 am Post subject: |
|
|
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 |
|
|
billcch
Joined: 19 Jan 2007 Posts: 44
|
Posted: Tue May 27, 2008 11:05 pm Post subject: How can I know if column reorder is completed. |
|
|
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 |
|
|
billcch
Joined: 19 Jan 2007 Posts: 44
|
Posted: Thu Jun 05, 2008 2:41 am Post subject: Did you forget me? |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 05, 2008 8:19 am Post subject: |
|
|
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 |
|
|
billcch
Joined: 19 Jan 2007 Posts: 44
|
Posted: Fri Jun 06, 2008 12:12 am Post subject: |
|
|
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 |
|
|
|