NTreeList, how to persist/restore column order? And what is correct way to access columns if you...


NTreeList, how to persist/restore column order? And what is correct...
Author
Message
lars knox
lars knox
Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)
Group: Forum Members
Posts: 22, Visits: 1

We have an NTreeList in a WinForms application. We have the AllowColumnReorder property set to true and are allowing users to change the order of the columns. I have two questions regarding this.

(1) After a column reorder, I can see that the NTreeList.Columns objects are rearranged (examined through the IDE's watch list), and they have new Index values. However, I am programatically reading and setting values using the old index values. Why does this continue to work when I have rearranged the columns?

(2) I need to persist the column order and load it back into the NTreeList the next time the application starts. The SaveToXml()/LoadFromXml() methods only save/restore the node data & original column configuration, not the new column orders. How would I get this to work? If I could successfully persist and restore the column orders, would I have to programmatically reference the columns by their column names instead of by their original index values?

I'm just a little confused because I can't find any data in the NTreeList object that describes how the columns are reordered (except the Index values), and when I do reorder them it doesn't make sense why current logic that accesses columns by index values continues to function. Any code, direction or documentation would be greatly appreciated. Thank you!

Lars

 

 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search