Create ListView columns dynamically from XML

  • Thread starter Thread starter yer darn tootin
  • Start date Start date
Y

yer darn tootin

looking for any suggestions on how to approach building functionality
to allow users to select their preferred columns for viewing in a
ListView control. The idea is similiar to how Windows Explorer works,
right click to select/deselect which columns are shown in the rh pane
listview. For me, I'd like the user preferences to be stored to xml
file and re-loaded when app starts.
( Not sure how Explorer achieves this )

any tips, code examples welcome..

Thank you,
Bob.
 
For this you can use the context menu and for saving it the registry.

Both are very easy to use, search for that in your help or on
MSDN.microsoft.com

I hope this helps,

Cor
 
Unfortunately theis response will be of no help to you except that...

I am working on something (perhaps) similar where I will have a folder/file
hiererchy in XML and will display the xml on a TreeView and clicking ony any
node will display the attributes of the "contained" files on a ListView.
Sounds amost like Windows Explorer? Yes - except this tool will load
different static, pre-built XMLs.

At this time I am trying to extract all FileTypes and their DefaultIcons
from the Registry.

Please notify this thread when/if you find solutions as i will. Good luck.

BK
 
looking for any suggestions on how to approach building functionality
to allow users to select their preferred columns for viewing in a
ListView control. The idea is similiar to how Windows Explorer works,
right click to select/deselect which columns are shown in the rh pane
listview. For me, I'd like the user preferences to be stored to xml
file and re-loaded when app starts.
( Not sure how Explorer achieves this )

any tips, code examples welcome..

Take a look at http://www.codeproject.com/csharp/Listview.asp

I used roughly the approach given in this article, which is basically
to have a collection of your own column header objects and serialise
the collection to XML, the only issues are getting the column order
and column width of moved resized columns, but that is explained in
the article.

Doug Taylor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top