Columns in a ListView

S

sugnaboris

Hope someone can help me with a question about this control.

I would like to display a list of file names, together with a
description for each file. I've done some prototyping, and the ListView
seems ideal, at least as far as the presentation of the static
inforamation is concerned.

However:

* the Item is logically the filename (that's akin to the primary key
in my list);
* so the filename should appear leftmost, but not be editable;
* the description text is currently a SubItem (it's an attribute of
the file);
* so the description should appear on the right - but I need it to be
editable.

There are many ways to allow a SubItem to be edited indirectly, but it
would be great if I could arrange it to be editable in situ.

I think that only the Item can be edited, which means that the
description would have to become Item. But I'd really want the filename
to remain in the left column.

So I'd like to be able to have the order of columns going SubItem[0],
Item, or something like that.

Here's an illustration:

File Description
========================
myFile1 | something
myFile2 | something else

- and I'd want users to be able to edit it to read:

File Description
========================
myFile1 | summat
myFile2 | quelque chose

Is this feasible with the ListView control?

Many thanks for any replies!

Ron
 
C

Cor Ligthert

Sugnaboris,

Why take this difficult approach. Even the Item in a listview is not the
nicest to Edit.

Why not just take a datagrid with a datatable, that you can customize in my
opinion completly in the way as you ask it.

Just my thought,

Cor
 
S

sugnaboris

I should probably have indicated that I need some help, when posting
the original. I'm still stuck, and any advice would be great.
 
S

sugnaboris

Thanks, Cor.

I have looked at some alternatives, and am not absolutely determined to
stick with a ListView - it just happens to be "just about" what I want,
so I wanted to know if there was any way of using it to do this.

While I wait for other reponses about the ListView approach, I'll knock
up another prototype with the method you suggest.
 

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

Top