Home All Groups Group Topic Archive Search About

Create ListView columns dynamically from XML

Author
28 Mar 2005 9:05 AM
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.

Author
28 Mar 2005 6:17 PM
Cor Ligthert
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
Author
13 Apr 2005 5:39 PM
BK
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

Show quoteHide quote
"yer darn tootin" wrote:

>
> 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.
>
>
Author
14 Apr 2005 2:03 PM
Doug Taylor
On 28 Mar 2005 01:05:23 -0800, "yer darn tootin"
<bob_nospam_3000@yahoo.com> wrote:

>
>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
Show quoteHide quote
>
>Thank you,
>Bob.